Branch prediction hint for SvREFCNT_dec
authorSteffen Mueller <smueller@cpan.org>
Tue, 11 Jun 2013 16:59:18 +0000 (18:59 +0200)
committerSteffen Mueller <smueller@cpan.org>
Tue, 11 Jun 2013 18:05:53 +0000 (20:05 +0200)
commit79e2a32a095274dde38cabdeca03b580bd9733d7
tree9e0513736246e0dbe31ef7341efbf25454670b5b
parent586fc6a31347339bf2b16e391b44aa458f723283
Branch prediction hint for SvREFCNT_dec

When decrementing the refcount on an SV, we have to branch on whether or
not we've reached a refcount of 0. But a quick instrumentation shows
that in virtually any program small or large, the number of decrements
without freeing greatly outweighs the number of decrements that cause a
free. Therefore, it's a net win to suggest to the compiler to emit a
branch prediction hint to go into the just-decrement branch.
inline.h