In benchmarking a build of xplor-nih (which is a mix of c++,c, and 
fortran) built entirely under gcc 4.1 or built using gcc 4.1's gfortran
and either Apple's gcc 4.0.1 or gcc 3.3, I have noticed that there
was a significant speed regression in the c++ code generation between
gcc 3.3 and gcc 4.0.x. The 4.0 binaries execute 15% slower (which is why
the xplor-nih developer still builds his distributions against g++-3.3
instead of g++-4.0).
    I was happy to see some recovery in the c++ code generation with
gcc 4.1. Now xplor-nih only exhibits a 7% speed loss using g++-4.1
compared to g++-3.3. I assume this is due to the total rewrite of
the optimizers in gcc > 4.0. Is there any tricks on can use to coax
the c++ performance from the g++ 4.1 to be equivalent to that seen in
g++-3.3 or will we have to wait for later versions of gcc for that?
             Jack

Reply via email to