------- Comment #13 from uros at kss-loka dot si 2006-10-26 22:22 ------- Just some performance numbers (sorry for the C testcase...) on x86_64: --cut here-- #include <math.h> #include <stdio.h>
int main() { double x; double t = 0.0; for (x = 10000000.0; x > 0.0; x -= 1.0) t += fmod (x, 1.7e-8); printf("%f\n", t); return 0; } --cut here-- [EMAIL PROTECTED] x86_64-test]$ gcc -march=k8 -O2 -lm mod.c [EMAIL PROTECTED] x86_64-test]$ time ./a.out 0.089927 real 0m4.304s user 0m4.294s sys 0m0.009s [EMAIL PROTECTED] x86_64-test]$ gcc -march=k8 -O2 -lm -mfpmath=387 mod.c [EMAIL PROTECTED] x86_64-test]$ time ./a.out 0.089927 real 0m0.351s user 0m0.349s sys 0m0.002s I know that this measurement depends on the library implementation, but this is current situation, where above tests shows that intrinsic MOD is 12.3 _times_ faster. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518