Re: Compiler performance tests on FreeBSD 10.0-CURRENT

From: David Chisnall <theraven_at_FreeBSD.org>
Date: Wed, 5 Sep 2012 10:36:50 +0100
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
Received on Wed Sep 05 2012 - 07:37:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC