Re: -ansi flag slows down fma() operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Ettl wrote:
> Hello friends,
> 
> i have made tests using the fma()-function and discovered an issue (see also this thread: http://gcc.gnu.org/ml/gcc-help/2009-04/msg00121.html). Brian Budge sent me a short benchmark programm to measure the execution time on my machine. Finally the fma() operation was faster than the a*b+c operation, but:
> 
> If you use the -ansi flag to compile, then the fma()-operation takes 4-5-times longer, as without.
> 
> So, now my question: Is this a known issue or an intendet behaviour? If yes, what other flags slow down such functions? Has anybody experienced a similiar case? 

fma() is new for C99.  In gcc, -ansi means C89, the old standard.
So, when you say -ansi the fast fma() builtin is disabled, and
a C library call is used instead.  You're seeing the effect of
disabling gcc builtin ofr fma().

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux