This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid redundant reload of PL_op in the runloop.
authorHugo van der Sanden <hv@crypt.org>
Thu, 15 Apr 2010 12:05:38 +0000 (13:05 +0100)
committerNicholas Clark <nick@ccl4.org>
Thu, 15 Apr 2010 12:05:38 +0000 (13:05 +0100)
(gcc, at least, generates suboptimal code without this dirty great hint)

run.c

diff --git a/run.c b/run.c
index 20c711a..eb465da 100644 (file)
--- a/run.c
+++ b/run.c
@@ -37,7 +37,8 @@ int
 Perl_runops_standard(pTHX)
 {
     dVAR;
-    while ((PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX))) {
+    register OP *op = PL_op;
+    while ((PL_op = op = CALL_FPTR(op->op_ppaddr)(aTHX))) {
     }
 
     TAINT_NOT;