From owner-freebsd-current@FreeBSD.ORG Wed Sep 5 09:37:03 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE99A106566C for ; Wed, 5 Sep 2012 09:37:03 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 782D78FC0A for ; Wed, 5 Sep 2012 09:37:03 +0000 (UTC) Received: from c120.sec.cl.cam.ac.uk (c120.sec.cl.cam.ac.uk [128.232.18.120]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q859apsm089083 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Wed, 5 Sep 2012 09:36:52 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: David Chisnall In-Reply-To: <50471BEE.6030708@andric.com> Date: Wed, 5 Sep 2012 10:36:50 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <96BD00DE-865C-4690-A2F1-E5B7C5D221C0@FreeBSD.org> References: <5046670C.6050500@andric.com> <20120904214344.GA17723@troutmask.apl.washington.edu> <504679CB.90204@andric.com> <20120904221413.GA19395@troutmask.apl.washington.edu> <50471BEE.6030708@andric.com> To: Dimitry Andric X-Mailer: Apple Mail (2.1278) Cc: Garrett Cooper , freebsd-current@FreeBSD.org, Steve Kargl Subject: Re: Compiler performance tests on FreeBSD 10.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 09:37:03 -0000 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=