Wow, I did that and I get now virtually identical performance, and the assembly code generated is now very similar to that from gcc-4.1/4.2, although there is some extra stuff I cannot explain yet. Was ffast-math default in 4.1/4.2 ? Is there any resource where I can read up on what is being done in the gcc development in this regard to learn more about whats going on ? I'm seriously tempted to just implement my own little complex math library, but thats A) ugly since there is already std::complex, B) more work and would have only the advantage to be a little more performance predictable maybe. Still puzzled. On Sat, Jan 16, 2010 at 3:31 PM, Marc Glisse <marc.glisse@xxxxxxxx> wrote: > Try -ffast-math (there may be less aggressive flags but that's the direction > to look into). To perfectly respect the standard definition of complex > multiplication, one has to jump through hoops... > > Now even with -ffast-math, I am surprised to see that float*complex > generates 4 multiplications, you could look trough bugzilla to see if there > is anything about what looks like a missed optimization. > > -- > Marc Glisse >