Mark the common case with LIKELY branch predictor hint
authorSteffen Mueller <smueller@cpan.org>
Tue, 18 Jun 2013 05:37:14 +0000 (07:37 +0200)
committerSteffen Mueller <smueller@cpan.org>
Tue, 18 Jun 2013 05:58:56 +0000 (07:58 +0200)
Freeing an SV usually indicates its refcount is 1.

sv.c

index 05c6536..4cd318d 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -6607,7 +6607,7 @@ Perl_sv_free2(pTHX_ SV *const sv, const U32 rc)
 
     PERL_ARGS_ASSERT_SV_FREE2;
 
-    if (rc == 1) {
+    if (LIKELY( rc == 1 )) {
         /* normal case */
         SvREFCNT(sv) = 0;