develooper Front page | perl.perl5.porters | Postings from March 2013

Re: Confusion about SvANY and Devel::Peek output

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
March 22, 2013 16:43
Subject:
Re: Confusion about SvANY and Devel::Peek output
Message ID:
20130322164248.GB2413@iabyn.com
On Wed, Mar 20, 2013 at 04:11:51PM +0100, demerphq wrote:
> Ok, thanks for the explanation.
> 
> >> Another question this raises for me: why is SvANY _before_ the
> >> refcount and flags? Id have expected the flags to be first, then the
> >> refcount then the sv_any member.
> >
> > Why?
> 
> Well id expect the flags to be first because I would assume they are
> used the most.

Here's a perlbench of unthreaded blead. Columns A nd B are vanilla,
columns C & D are with the SV reordered to sv_flags/sv_refcnt/sv_any.

Possibly 1% faster. Maybe 2% faster. Probably just noise!

                           A       B       C       D
                         ---     ---     ---     ---
arith/mixed              100     101     106     107
arith/trig               100      99      98      97
array/copy               100      99     103     103
array/foreach            100     101     100      99
array/index              100     100     101     101
array/pop                100      98      97      98
array/shift              100     100     100     101
array/sort-num           100     101     105     105
array/sort               100     100     100      99
call/0arg                100     100      89      90
call/1arg                100     101     107     106
call/2arg                100     101     112     110
call/9arg                100     102      97      97
call/empty               100     101     108     110
call/fib                 100     102     107     106
call/method              100     100     107     106
call/wantarray           100     104      98      98
hash/copy                100     100     100     100
hash/each                100     100     100     100
hash/foreach-sort        100     100     102     101
hash/foreach             100     101      98      99
hash/get                 100     101      90      91
hash/set                 100      99      96      99
loop/for-c               100     100      98      92
loop/for-range-const     100     100     101      83
loop/for-range           100     103     107     108
loop/getline             100     102     106     105
loop/while-my            100      99     101     101
loop/while               100      98     101     103
re/const                 100      98      96      97
re/w                     100     100     100     101
startup/fewmod           100     102     101     100
startup/lotsofsub        100     100     106     105
startup/noprog           100     100     100     100
string/base64            100     102     100      99
string/htmlparser        100     100     100     100
string/index-const       100     100     100      99
string/index-var         100     100     103     103
string/ipol              100     101     102     103
string/tr                100     101     123     123

AVERAGE                  100     100     102     101


-- 
"You're so sadly neglected, and often ignored.
A poor second to Belgium, When going abroad."
    -- Monty Python, "Finland"

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