Author: timbo
Date: Fri Mar  2 07:44:16 2012
New Revision: 15199

Modified:
   dbi/trunk/DBI.xs

Log:
[PATCH 6/8] XS_DBI_dispatch: only test qsv when it may be set (David Mitchell)

Only test qsv in the branch where it might be set.
Yes, this is a micro-optimisation.



Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs    (original)
+++ dbi/trunk/DBI.xs    Fri Mar  2 07:44:16 2012
@@ -3538,15 +3538,14 @@
             if (*key == 'P' && strEQ(key, "Profile"))
                 profile_t1 = 0.0;
         }
+        if (qsv) { /* skip real method call if we already have a 'quick' value 
*/
+            ST(0) = sv_mortalcopy(qsv);
+            outitems = 1;
+            goto post_dispatch;
+        }
     }
 
-    if (qsv) { /* skip real method call if we already have a 'quick' value */
-
-        ST(0) = sv_mortalcopy(qsv);
-        outitems = 1;
-
-    }
-    else {
+    {
 #ifdef DBI_save_hv_fetch_ent
         HE save_mh;
         if (meth_type == methtype_FETCH)

Reply via email to