Date: Fri, 11 Mar 2011 16:01:20 +0100 From: Alexander Leidinger <Alexander@Leidinger.net> To: Martin Matuska <mm@FreeBSD.org> Cc: freebsd-performance@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: FreeBSD Compiler Benchmark: gcc-base vs. gcc-ports vs. clang Message-ID: <20110311160120.16406m9ivk2id90c@webmail.leidinger.net> In-Reply-To: <4D7943B1.1030604@FreeBSD.org> References: <4D7943B1.1030604@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Martin Matuska <mm@FreeBSD.org> (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110311160120.16406m9ivk2id90c>