develooper Front page | perl.perl5.porters | Postings from December 2012

Re: a job for someone? SvREFCNT_dec_NN()

Thread Previous | Thread Next
From:
Steffen Mueller
Date:
December 9, 2012 19:16
Subject:
Re: a job for someone? SvREFCNT_dec_NN()
Message ID:
50C4E395.7070300@cpan.org
On 12/04/2012 01:04 PM, Dave Mitchell wrote:
> I've just added the SvREFCNT_dec_NN() macro, which can be used in
> situations where we know the sv isn't null: so that the check can be
> skipped.
>
> On gcc on x64_64 platforms, this makes each use of SvREFCNT_dec() 5 code
> bytes shorter, and avoids a test and jump.
>
> There are over 500 uses of SvREFCNT_dec() within the perl core; ideally
> one or more volunteers could audit all those uses, and change them to the
> _NN variant where its clear that the sv can't be null (e.g. because fields
> within it have already been accessed, or it's an arg declared NN in
> embed.fnc).

I've done a couple of these, but I'm not at the top of my game (damn 
flu). All tests pass with my changes. I'd appreciate cursory review 
nonetheless:

smueller/svrefcntdecnn

--Steffen

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