summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorSteffen Mueller <smueller@cpan.org>2014-11-30 17:26:38 +0100
committerSteffen Mueller <smueller@cpan.org>2014-12-01 08:36:36 +0100
commit7667e7f116d93f938701c92dcd64886d64138761 (patch)
tree51ec9b6b96dbcbfab5c9ed96f11e23f5cb44d252 /sv.h
parenta10d07f36dfb98f1bcda5f925e584162916f2c66 (diff)
downloadperl-7667e7f116d93f938701c92dcd64886d64138761.tar.gz
More branch prediction hints for sv_setsv_flags
Dave's cachegrind benchmark says "small win": REF THIS ------ ------ Ir 105.35 105.91 Dr 104.45 105.42 Dw 105.42 105.17 COND 104.33 104.58 IND 107.04 106.76 COND_m 98.55 110.11 IND_m 110.09 111.08
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.h b/sv.h
index ec5726d11c..303bbfac74 100644
--- a/sv.h
+++ b/sv.h
@@ -349,7 +349,7 @@ perform the upgrade if necessary. See C<svtype>.
/* Sadly there are some parts of the core that have pointers to already-freed
SV heads, and rely on being able to tell that they are now free. So mark
them all by using a consistent macro. */
-#define SvIS_FREED(sv) ((sv)->sv_flags == SVTYPEMASK)
+#define SvIS_FREED(sv) UNLIKELY(((sv)->sv_flags == SVTYPEMASK))
/* this is defined in this peculiar way to avoid compiler warnings.
* See the <20121213131428.GD1842@iabyn.com> thread in p5p */