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

a job for someone? SvREFCNT_dec_NN()

Thread Next
From:
Dave Mitchell
Date:
December 4, 2012 12:04
Subject:
a job for someone? SvREFCNT_dec_NN()
Message ID:
20121204120420.GN1900@iabyn.com
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 don't want to achieve immortality through my work...
I want to achieve it through not dying.
    -- Woody Allen

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