Quoting Martin Matuska <mm_at_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 _at_ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild _at_ FreeBSD.org : PGP ID = 72077137Received on Fri Mar 11 2011 - 14:01:34 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:12 UTC