develooper Front page | perl.perl5.porters | Postings from February 2003

Re: benchmarking - it's now all(-1,0,1,5,6)% faster

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
February 16, 2003 08:44
Subject:
Re: benchmarking - it's now all(-1,0,1,5,6)% faster
Message ID:
20030216154506.GB306@Bagpuss.unfortu.net
On Tue, Feb 11, 2003 at 09:24:21AM +0100, A. Bergman wrote:
> 
> On måndag, feb 10, 2003, at 23:03 Europe/Stockholm, 
> perl5-porters-return-71692-arthur=contiller.se@perl.org wrote:

I've never heard myself called that before :-)

> >This is probably the right default for the general case, but it is
> >counterproductive for benchmarking small code changes. So on gcc 2.95 
> >I'm
> >compiling with:
> >
> >-O -malign-loops=3 -malign-jumps=3 -malign-functions=3 
> >-mpreferred-stack-boundary=3 -march=i686
> >
> >(thats 2**3, ie 8)
> >
> >and on gcc 3.2 on a different machine:
> >-O3 -falign-loops=16 -falign-jumps=16 -falign-functions=16 
> >-mpreferred-stack-boundary=3 -march=i586
> >
> 
> Does compiling with these settings make general perl faster?

No. all together about 2% slower, at least according to perlbench.  I'm not
that surprised.  I didn't experiment with trying each independently, as I
was looking for deterministic benchmarks when code changed slightly, rather
than a faster speed from aggressive compiler options. I expect that the loop
alignment forcing options will only really help on the tight loops, such as
the substring finding loop, or hashing loop, although the hashing loop is
inlined everywhere it is needed, so that's a pain. If someone has the time
they could experiment with which options might help, and whether pulling some
code out into a separate file that benefits from (say) loop alignment helps
measurably.

Although I suspect that anyone with time to do this would be better spending
it making better benchmarks.

Nicholas Clark

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