develooper Front page | perl.perl5.porters | Postings from August 2010

Re: Compiling with clang

Thread Previous | Thread Next
From:
Greg Lindahl
Date:
August 19, 2010 14:02
Subject:
Re: Compiling with clang
Message ID:
20100819210152.GA19830@bx9.net
On Mon, Aug 16, 2010 at 03:58:10PM +0000, Ævar Arnfjörð Bjarmason wrote:

> I did a test where I compiled with GCC 4.4 and clang from SVN trunk,
> both with -O3 and without debugging and ran "make test_harness" in a
> Benchmark.pm loop with $numcpu+1 test jobs.
>
> clang was consistently 5% slower on that test. I asked in the #llvm
> IRC channel and found that clang's performance should be 10-15% faster
> than GCC 4.2, but that GCC itself has gotten faster since then.

Putting on my compiler-guy hat:

* If clang is 10-15% faster on average, the odds of you seeing 10-15%
faster are not good. You'll probably see less or more.

* Perl is weird. You should definitely try -O2; if anyone has ever
tuned clang for SPECint2006 you should look at what options they used
for 400.perlbench, which is based on perl 5.8.7. If not, I would
exhaustively search all of the major clang optimization options.

As an example, the latest PathScale flags for 400.perlbench I could
find are: -Ofast -IPA:plimit=20000 -IPA:field_reorder=on -LNO:opt=0
-WOPT:if_conv=0 -CG:local_sched_alg=1. That's very different from
either -O2 or -O3.

* I couldn't find any clang results at spec.org

-- greg



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About