This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -ffast-math option live up to its name?


kevin diggs <diggskevin38@gmail.com> writes:

> Does the -ffast-math option speed up operations enough to make
> fighting with mozilla/firefox source worth the trouble? I think the
> main problem is identifying NaNs.

As with all such questions, the real answer is: it depends.

If your code uses a lot of floating point operations, then -ffast-math
can speed things up quite a bit on some processors, notably 32-bit x86
processors.  E.g., if your code is dominated by calls to sin, then
-ffast-math could give you as much as a 50% speed improvement on that
platform.  But of course not much code is dominated by calls to sin, and
the actual speedup is going to depend on the actual code.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]