On 09/04/2009 05:04 PM, FX wrote:
-- it's unarguably a glibc issue: if exp() is fast and expf() is
slow, why doesn't glibc implement expf() by calling exp()? (yes, there
can be other issues like rounding or so, but they can also be dealt
with separately)
If I recall correctly, it is mostly an x86-64 problem. AMD has some math
patches for GLIBC which speed things up a lot. I think those are used in
openSUSE/SLES but not in Fedora. On the other hand, the AMD patches have
a problem with signaling NaN, which is being fixed [1,4].
Some older timings (from PR 34128) on openSUSE (!) -- for "sin" but
there is the same problem as for exp:
g77 gfortran
-m32 real(4) 0.408s 0.421s
-m64 real(4) 1.040s 0.589s ! sinf on x86-64: 40% faster!
-m32 real(8) 0.411s 0.408s
-m64 real(8) 0.976s 0.968s ! sin on x86-64