This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: complex performance
- To: <nbecker at fred dot net>
- Subject: Re: complex performance
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at dptmaths dot ens-cachan dot fr>
- Date: 14 Jan 1999 19:17:02 +0100
- Cc: egcs at cygnus dot com
- References: <E100oTs-0000tC-00@hns.com>
>>>>> <nbecker@fred.net> écrit :
> While I'm bitching about performance, one of the worst offenses is:
> complex (_FLT r = 0, _FLT i = 0): re (r), im (i) { }
> This means that every time this comes into scope:
> complex<double> array[BIG]
> we waste possibly large amounts of time initializing the array with
> zero values.
In *theory*.
> ... I think this is very unfortunate.
Depending on the optimization level you select, the compiler might as
well generate a memset!
regarding optimization issue: I have a rule of thumb
test; profile; and then speculate.
-- Gaby