develooper Front page | perl.perl5.porters | Postings from April 2007

Re: Change 31034: More variable reordering saves another 40 bytes from the interpreter

Thread Next
From:
Jerry D. Hedden
Date:
April 23, 2007 13:35
Subject:
Re: Change 31034: More variable reordering saves another 40 bytes from the interpreter
Message ID:
1ff86f510704231335j6ba4855ci85794aff001ba11f@mail.gmail.com
> Change 31034 by nicholas@nicholas-z1 on 2007/04/23 14:40:05
>
>         More variable reordering saves another 40 bytes from the interpreter
>         structure. (on LP64). Zero cost space saving! Woohoo!
>
> Affected files ...
>
> ... //depot/perl/intrpvar.h#196 edit
> ... //depot/perl/pod/perltodo.pod#175 edit
> ... //depot/perl/thrdvar.h#81 edit

This changes is BAD.  It reduces the speed of the interpreter by
somewhere around 20%!

I was doing some testing on field hashes when I observed it.  I built
31033 and 31034 and got the following results:

Change 31033 results:

set.pl
                Rate     Refaddr   FieldHash   Stringify FieldHash_F
Refaddr     158220/s          --        -30%        -51%        -51%
FieldHash   225377/s         42%          --        -30%        -31%
Stringify   323976/s        105%         44%          --         -0%
FieldHash_F 324588/s        105%         44%          0%          --

get.pl
                Rate     Refaddr   Stringify   FieldHash FieldHash_F
Refaddr     158526/s          --        -48%        -72%        -74%
Stringify   306052/s         93%          --        -47%        -50%
FieldHash   575532/s        263%         88%          --         -6%
FieldHash_F 613809/s        287%        101%          7%          --


Change 31034 results:

set.pl
                Rate     Refaddr   FieldHash FieldHash_F   Stringify
Refaddr     132068/s          --        -26%        -47%        -47%
FieldHash   179161/s         36%          --        -28%        -28%
FieldHash_F 247350/s         87%         38%          --         -1%
Stringify   249899/s         89%         39%          1%          --

get.pl
                Rate     Refaddr   Stringify   FieldHash FieldHash_F
Refaddr     129483/s          --        -46%        -65%        -66%
Stringify   240941/s         86%          --        -35%        -37%
FieldHash   371917/s        187%         54%          --         -3%
FieldHash_F 384773/s        197%         60%          3%          --

Why did this change affect the performance so much?

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