[Bug optimization/8126] [3.3/3.4 regression] Floating point computation far slower in 3.2 than in 2.95

uros at kss-loka dot si gcc-bugzilla@gcc.gnu.org
Thu Oct 30 06:26:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8126



------- Additional Comments From uros at kss-loka dot si  2003-10-30 06:23 -------
I have some measurements with RedHat 7.3 gcc-2.96 and gcc-3.3. The results on
166 MHz pentium MMX are quite interesting. They show that for attached testcase
(test.c in attachments, modified to plain .c file) gcc-3.3 is faster that
gcc-2.96. Also of interest is gcc 3.3 with -fnew-ra and -funroll-all-loops
switches. This combination is the fastest one, however ony -fnew-ra is the worst
one.

[uros@localhost test]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
===
[uros@localhost test]$ gcc -ffast-math -fomit-frame-pointer -O3 test.c
[uros@localhost test]$ time ./a.out
Start?
Stop!
Result = 0.000000, 0.000000, 1.000000

real	0m22.352s
user	0m22.310s
sys	0m0.010s
[uros@localhost test]$ gcc -ffast-math -fomit-frame-pointer -funroll-all-loops
-O3 test.c
[uros@localhost test]$ time ./a.out
Start?
Stop!
Result = 0.000000, 0.000000, 1.000000

real	0m19.831s
user	0m19.780s
sys	0m0.020s
===
===
[uros@localhost test]$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure 
Thread model: posix
gcc version 3.3
===
[uros@localhost test]$ gcc -ffast-math -fomit-frame-pointer -O3 test.c
[uros@localhost test]$ time ./a.out
Start?
Stop!
Result = 0.000000, 0.000000, 1.000000

real	0m19.408s
user	0m19.320s
sys	0m0.010s
===
[uros@localhost test]$ gcc -ffast-math -fomit-frame-pointer -funroll-all-loops
-O3 test.c
[uros@localhost test]$ time ./a.out
Start?
Stop!
Result = 0.000000, 0.000000, 1.000000

real	0m14.518s
user	0m14.470s
sys	0m0.010s
===
[uros@localhost test]$ gcc -ffast-math -fomit-frame-pointer -funroll-all-loops
-fnew-ra -O3 test.c
[uros@localhost test]$ time ./a.out
Start?
Stop!
Result = 0.000000, 0.000000, 1.000000

real	0m13.540s
user	0m13.520s
sys	0m0.010s
===
[uros@localhost test]$ gcc -ffast-math -fomit-frame-pointer -fnew-ra -O3 test.c
[uros@localhost test]$ time ./a.out
Start?
Stop!
Result = 0.000000, 0.000000, 1.000000

real	0m27.185s
user	0m27.140s
sys	0m0.010s



More information about the Gcc-bugs mailing list