From owner-freebsd-current@FreeBSD.ORG Fri Mar 11 15:01:34 2011 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 837C3106564A for ; Fri, 11 Mar 2011 15:01:34 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 23B458FC0C for ; Fri, 11 Mar 2011 15:01:33 +0000 (UTC) Received: from outgoing.leidinger.net (p5B15535C.dip.t-dialin.net [91.21.83.92]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 0C58384400E; Fri, 11 Mar 2011 16:01:30 +0100 (CET) Received: from webmail.leidinger.net (unknown [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id A15642905; Fri, 11 Mar 2011 16:01:26 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id p2BF1LO4079981; Fri, 11 Mar 2011 16:01:21 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 11 Mar 2011 16:01:20 +0100 Message-ID: <20110311160120.16406m9ivk2id90c@webmail.leidinger.net> Date: Fri, 11 Mar 2011 16:01:20 +0100 From: Alexander Leidinger To: Martin Matuska References: <4D7943B1.1030604@FreeBSD.org> In-Reply-To: <4D7943B1.1030604@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 0C58384400E.A619A X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.274, required 6, autolearn=disabled, RDNS_NONE 1.27) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1300460490.97498@fA3lm8covrc9iwJh8xbdzQ X-EBL-Spam-Status: No Cc: freebsd-performance@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: FreeBSD Compiler Benchmark: gcc-base vs. gcc-ports vs. clang 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: Fri, 11 Mar 2011 15:01:34 -0000 Quoting Martin Matuska (from Thu, 10 Mar 2011 22:33:37 +0100): > Hi everyone, > > we have performed a benchmark of the perl binary compiled with base gcc, > ports gcc and ports clang using the perlbench benchmark suite. > Our benchmark was performed solely on amd64 with 10 different processors > and we have tried different -march= flags to compare binary performance > of the same compiler with different flags. > > Here is some statistics from the results: > - clang falls 10% behind the base gcc 4.2.1 (test average) > - gcc 4.5 from ports gives 5-10% better average performance than the > base gcc 4.2.1 Can you rule out gcc specific optimizations as a cause of this difference for clang? As an example of what I mean: the configure script of LAME will use additional optimization flags if it detects gcc (even depending on the version of gcc). For clang (or other compilers which have similar flags than gcc but are not identified as gcc) there it will not use add those flags. Another possibility are preprocessor checks for gcc-specific defines (in case clang does not provide the same predefined defines, I do not know)? Bye, Alexander. -- This MUST be a good party -- My RIB CAGE is being painfully pressed up against someone's MARTINI!! http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137