Compiler performance tests on FreeBSD 10.0-CURRENT
David Chisnall
theraven at FreeBSD.org
Wed Sep 5 09:37:03 UTC 2012
On 5 Sep 2012, at 10:31, Dimitry Andric wrote:
> These are just the default FreeBSD optimization flags for building
> clang, which are probably used by the majority of users out there.
> This is the case that I was interested in particularly. The
> -fno-strict-aliasing is not really my choice, but it was introduced
> in the past by Nathan Whitehorn, who apparently saw problems without
> it. It will hopefully disappear in the future.
Clang currently defaults to no strict aliasing on FreeBSD. In my experience, most C programmers misunderstand the aliasing rules of C and even people on the C++ standards committee often get them wrong for C++, so trading a 1-10% performance increase for a significant chance of generating non-working code seems like a poor gain. If people are certain that they do understand the rules, then they can add -fstrict-aliasing to their own CFLAGS.
David
More information about the freebsd-current
mailing list