From: Kazushige Goto <goto@statabo.rim.or.jp>
Subject: Re: Questions on performance methods
Date: Sat, 28 Nov 1998 21:53:28 +0900 [thread overview]
Message-ID: <19981128215328A.goto@statabo.rim.or.jp> (raw)
In-Reply-To: <199811270749.IAA14161@keksy.mchp.siemens.de>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2788 bytes --]
Hi,
# I'm pleased to organize ML of high performance computing.
From: Martin Kahlert <martin.kahlert@mchp.siemens.de>
Subject: Questions on performance methods
martin> I would like to help improving the performance of Alpha software, too.
martin> It seems to me, that Mr. Goto is T H E guru of alpha performance.
martin> Hope he's listening.
I can show/explain you how to optimize, but it's entirely dependent of
source code. Of course, there are some common "rules" to get faster
code, but it'll be slightly faster than before(or almost same).
# I'm not a guru, though :-)
For example,
From: Jonathan L Dubois <dubois@bec.physics.udel.edu>
Subject: request for perf improvement suggestions
void r12(double *rij,double *x1,double *x2){
int i;
double tmp1,tmp2;
tmp2 = 0;
for(i=0;i<3;i++){
tmp1 = x1[i]-x2[i];
tmp2 += tmp1*tmp1;
}
tmp2 = sqrt(tmp2);
*rij = tmp2;
}
First, you must check your routines(with profile(-pg option), you can
check No.1 and 2 easily).
1. find the bottle-necked subroutine.
2. check whether this(bottle-necked) routine is called a few times,
or many times.
If this routine is called many times, the overhead is important,
therefore using "inline function" or macro is good way to
improve.
3. check if this routine calls other subroutines.
Alpha has many registers, but we can not use enough registers
if subroutine calls other subroutines(egcs/gcc is not good at
optimizing such a case).
Obviosly, the subroutine "r12" is called many times and calles sqrt
routine and bottle neck is sqrt. Of course, you can modify as
Mr. Stefan Schroepfer said, but it'll be only slightly faster(5 to
10%).
Actually, sqrt routine is pretty "sparse" because of calculation
dependencies. If it's possible to store temporary array in the lump,
you may use my sqrtv(vectorlized sqrt) routine. This sqrtv routine is
5 times faster than normal sqrt routine. But you showed only kernel
routine, so I do not know whether it's possible to be faster or not.
In this case, it's important "how to call" r12 routine.
So, you should show the routines which call r12 routine.
martin> How good is the scheduling of egcs these days on alpha?
martin> Can I describe something like 'the alpha can do an floating point
martin> add a fp mult and two int ops in one cycle, when they are in a block
martin> starting on an x-Byte boundary' to the egcs-scheduler? Or is this even
martin> implemented?
Now, egcs has a good scheduler except for complex value, I think. We
need optimized pre-processor like KAP(SUIF is freely available, but
it's not good enough).
Thanks,
goto@statabo.rim.or.jp
next prev parent reply other threads:[~1998-11-28 12:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-27 7:49 Questions on performance methods Martin Kahlert
1998-11-27 15:42 ` pshimizu
1998-11-28 12:53 ` Kazushige Goto [this message]
1998-11-28 19:28 ` Jonathan L Dubois
1998-11-29 3:40 ` Kazushige Goto
1998-11-29 18:09 ` pshimizu
1998-11-30 2:54 ` naohiko shimizu
1998-12-01 6:24 ` naohiko shimizu
1998-12-01 14:19 ` Joachim Wesner
1998-12-02 3:35 ` naohiko shimizu
1998-12-02 9:21 ` Joachim Wesner
1998-12-02 15:42 ` pshimizu
1998-12-02 16:48 ` Joachim Wesner
1998-12-07 3:24 ` naohiko shimizu
-- strict thread matches above, loose matches on Subject: below --
1998-11-30 14:09 Richard Gorton
[not found] <Pine.LNX.3.96.981201174956.16291A-100000@bec.physics.udel.edu>
1998-12-04 2:39 ` naohiko shimizu
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox