Compiler performance tests on FreeBSD 10.0-CURRENT

Dimitry Andric dimitry at andric.com
Thu Sep 6 12:57:19 UTC 2012


On 2012-09-06 12:20, David Chisnall wrote:
...
> There may also be a difference in whether -ffast-math is the default on each compiler.  On x86, this will replace a number of libm calls with (much faster, but less accurate) SSE or x87 instructions.  If this is enabled by default with clang and not with gcc, it would account for the difference.

No, -ffast-math is not enabled by default in clang, as far as I can
tell.  Also, the help text for the option says:

"Enable the *frontend*'s 'fast-math' mode. This has no effect on
optimizations, but provides a preprocessor macro __FAST_MATH__ the same
as GCC's -ffast-math flag."


More information about the freebsd-current mailing list