Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Toon Moene <toon@moene.indiv.nluug.nl>
Subject: Re: gcc/egcs C optimization
Date: 1998/11/05	[thread overview]
Message-ID: <71t89b$221$5@newnews.nl.uu.net> (raw)
In-Reply-To: 3640478F.4F2C8020@theo.physik.uni-stuttgart.de

"C.Simmendinger" <chrisi@theo.physik.uni-stuttgart.de> wrote:

> The only thing which is sort of sad about egcs ist the absolutely poor
> performance of g77 with respect to complex numbers.
> I'm just trying to optimize the BLAS a bit more, i.e. just wrote
> a faster cgemv/zgemv. Had to do all calculations in floats
> with the corresponding conversions complex->float, float->complex.
> In doing so i got a speedup of *4-6*.
> I just keep wondering why the performace is so
> embarrassing with respect to this ?
>  Since a lot of numerical stuff (e.g LAPACK) is written in fortran,
> improvements on this sector would help quite a bit.

The cause is not exactly known - it is related to the way complex numbers are 
treated in the "middle-end" of the compiler, i.e. as a (real, imag) pair.  On 
64-bit hosts (Alpha, MIPS-4000 and higher, UltraSPARC, etc.) a COMPLEX number 
is a 2x32 bits entity, which (for optimisation purposes) sometimes is treated 
as a single 64 bit quantity.  When storing/retrieving this from memory that's 
not a problem - however, when trying to stuff a COMPLEX number in a 64 bit 
register, you're asking for trouble.

The corollary of this is that for DOUBLE COMPLEX, this shouldn't be an issue.  
Unfortunately, although I haven't seen evidence of the contrary, I cannot 
proof this.

HTH,

-- 
Toon Moene (mailto:toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: mailto:fortran@gnu.org; egcs: mailto:egcs-bugs@cygnus.com



  parent reply	other threads:[~1998-11-05  5:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-31  5:00 gcc/egcs C optimization Berk Sensoy
1998-11-02  5:00 ` Conrad Sanderson
1998-11-02  5:00   ` Murx
1998-11-03  5:00   ` Adam C. Powell, IV
1998-11-03  5:00     ` Greg Lindahl
1998-11-04  5:00       ` Steven G. Johnson
1998-11-04  5:00     ` C.Simmendinger
1998-11-04  5:00       ` Craig Burley
1998-11-04  5:00       ` Greg Lindahl
1998-11-05  5:00         ` C.Simmendinger
1998-11-05  5:00           ` Greg Lindahl
1998-11-05  5:00             ` C.Simmendinger
1998-11-05  5:00       ` Toon Moene [this message]
1998-11-06  5:00         ` C.Simmendinger
1998-11-06  5:00         ` C.Simmendinger
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