This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C optimization tests - almabench results
- From: Uros Bizjak <uros at kss-loka dot si>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 03 May 2004 09:58:11 +0200
- Subject: C optimization tests - almabench results
Hello!
I was trying to analyze, what is wrong with gcc's trigonometric
functions in alma benchmark. However, I can't confirm long execution
times with alma benchmark [alma benchmark was downloaded from
http://www.coyotegulch.com/download/almabench-1.0.1.tar.gz.
With CVS mainline gcc (3. May 2004), my timings on 3.2G pentium4, 2GB
RAM are:
[uros@omen5 cpp]$ g++ -O3 -march=pentium4 -lm almabench.cpp
[uros@omen5 cpp]$ time ./a.out
real 0m25.875s
user 0m25.668s
sys 0m0.053s
[uros@omen5 cpp]$ g++ -O3 -ffast-math -march=pentium4 almabench.cpp
[uros@omen5 cpp]$ time ./a.out
real 0m22.616s
user 0m22.564s
sys 0m0.035s
[uros@omen5 cpp]$ g++ -O3 -ffast-math -D__NO_MATH_INLINES
-march=pentium4 almabench.cpp
[uros@omen5 cpp]$ time ./a.out
real 0m15.215s
user 0m15.172s
sys 0m0.041s
I don't think that 15% faster clock can produce such a difference...
BTW: With -O3 -ffast-math -D__NO_MATH_INLINES, these instructions should
be generated:
objdump -S a.out | grep fsincos
80487ae: d9 fb fsincos
80487ce: d9 fb fsincos
8048804: d9 fb fsincos
8048839: d9 fb fsincos
804889a: d9 fb fsincos
80488ea: d9 fb fsincos
8048945: d9 fb fsincos
8048950: d9 fb fsincos
8048959: d9 fb fsincos
8048981: d9 fb fsincos
Uros.