This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: complex performance


>>>>>    <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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]