GCC beaten by ICC in stupid trig test!

Roger Sayle roger@eyesopen.com
Thu Mar 25 00:11:00 GMT 2004


May I remind everyone that the subject title "GCC beaten by ICC in
stupid trig test!" refers to a posting by Scott Robert Ladd in which
Intel's icc compiler generates floating point code 64x faster than
gcc 3.3.3 (http://gcc.gnu.org/ml/gcc/2004-03/msg00634.html).

Would anyone like to hazard a guess at how many floating point additions
Intel icc v7 generates for the following function?  Even with icc's
default arguments, i.e. "icc foo.c"?

int foo(double a, double b, double c)
{
  return (a+b)+c == a+(b+c);
}


It might surprise some people that even with -funsafe-math-optimizations
and/or -ffast-math GCC can't generate code with that performance/accuracy
trade-off!

Roger
--



More information about the Gcc mailing list