On måndag, feb 10, 2003, at 23:03 Europe/Stockholm, [EMAIL PROTECTED] wrote:


50% of the time your function/label/loop/jump is 16 byte aligned.
50% of the time your function/label/loop/jump is "randomly" aligned

So, a slight code size change early on in a file can cause the remaining
functions to ping either onto, or off alignment. Hence later loops in
completely unrelated code can happen to become optimally aligned, and go
faster. And similarly other loops which were optimally aligned will now
go unaligned, and go more slowly.

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?

Arthur


Reply via email to