GCC viciously beaten by ICC in trig test!
Ranjit Mathew
rmathew@hotmail.com
Mon Mar 15 07:42:00 GMT 2004
Roger Sayle wrote:
> Compiling with gcc -O2 -ffast-math on Linux generates x86 code that's
> significantly slower than Intel's compiler output. However, commenting
> out the "#include <math.h>" corrects the situation and GCC can then
> generate *exactly* the same sequence as icc.
Thank you *so much* for that insight!
Looking at the glibc 2.3.2 headers (bits/mathinline.h)
on my RHEL3 system, a simple workaround might be to
add -D__NO_MATH_INLINES to the compiler command line.
Depending on when we started to do magic with trig.
functions, perhaps the glibc maintainers ought to \
modify that "#if __GNU_PREREQ (2, 8)" guard for
the inlined trig. functions appropriately.
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/
More information about the Gcc
mailing list