In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/8c225ab79ea4360be9f3c8f4accb055adc2a9269?hp=b37c54af8999d4b762bc5532a5ded18c28f61270>
- Log ----------------------------------------------------------------- commit 8c225ab79ea4360be9f3c8f4accb055adc2a9269 Author: Father Chrysostomos <[email protected]> Date: Fri Oct 24 14:33:26 2014 -0700 Extend void list optimisation to two lexicals The list+pushmark optimisation and the padrange optimisation conflict. In void context, the former is avoided if it looks as though padrange is possible (pushmark followed by lexical var), but now that padrange happens only for two or more lexicals, we can check for that. This makes âmy $a, our $bâ marginally faster. (There are still cases where this optimisation doesnât happen though it could, but things would get even more compilcated and we would only be optimising for rare edge cases.) ----------------------------------------------------------------------- Summary of changes: op.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/op.c b/op.c index 6ac8f3f..a4d7bb0 100644 --- a/op.c +++ b/op.c @@ -1893,6 +1893,11 @@ Perl_scalarvoid(pTHX_ OP *o) || ( kid->op_type != OP_PADSV && kid->op_type != OP_PADAV && kid->op_type != OP_PADHV) + || kid->op_private & ~OPpLVAL_INTRO + || !(kid = OP_SIBLING(kid)) + || ( kid->op_type != OP_PADSV + && kid->op_type != OP_PADAV + && kid->op_type != OP_PADHV) || kid->op_private & ~OPpLVAL_INTRO) ) { op_null(cUNOPo->op_first); /* NULL the pushmark */ -- Perl5 Master Repository
