Re: Compiler performance tests on FreeBSD 10.0-CURRENT

From: Dimitry Andric <dimitry_at_andric.com>
Date: Wed, 05 Sep 2012 12:56:07 +0200
On 2012-09-05 11:36, David Chisnall wrote:
> On 5 Sep 2012, at 10:31, Dimitry Andric wrote:
>>    TThe
>>    -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.

Yes, but upstream has never used -fno-strict-aliasing, just plain -O2.
I run regular separate builds of pristine upstream clang on FreeBSD, and
I haven't seen any failures due aliasing problems in all the regression
tests.  That doesn't guarantee there are no problems, of course...


> 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.

I'm actually quite interested in the performance difference; I think I
will run a few tests. :)
Received on Wed Sep 05 2012 - 08:56:06 UTC

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