optimized code slower

Thomas Pornin bip@orion.ens.fr
Thu Feb 19 05:32:00 GMT 1998


Hello,

I think there is something fishy in the optimizations egcs does on an
alpha.

I have a UDB (alpha 21064 cpu, speed 266 MHz) with a redhat-5.0 linux
install. This one comes with gcc-2.7.2.3. I compiled gcc-2.8.0 and
egcs-980214.

I benched a code I wrote, that performs 1048576 successive DES encryptions.
** With gcc-2.7.2.3 and gcc-2.8.0, with compile options -Wall -O9, the
   whole calculus takes between 8.7 and 9.2 seconds.
** With egcs-980214 and the --enable-haifa configure option:
     with -Wall -O9, it takes over 17 seconds
     with -Wall -O1, it takes around 12 seconds
     with -Wall -O1 -fschedule-insns, it takes about 9 seconds
     with -Wall -O1 -fschedule-insns -fschedule-insns2, it takes 14 seconds
** With egcs-980214 and the --disable-haifa configure option:
     with -Wall -O9, it takes 14 seconds
     with -Wall -O1, it takes around 12 seconds
     with -Wall -01 -fschedule-insns, it takes 9 seconds
     with -Wall -O1 -fschedule-insns -fschedule-insns2, it takes 9 seconds

Or is there some configure option that ensures me the -O9 will be the best ??

	--Thomas Pornin



More information about the Gcc-bugs mailing list