From: Father Chrysostomos Date: Mon, 5 Dec 2011 20:55:57 +0000 (-0800) Subject: Put optimised substr assignment in void context X-Git-Tag: accepted/trunk/20130322.191538~1860 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d72a08cef7cdd5dc1701378ef61657bcd4fee58e;p=platform%2Fupstream%2Fperl.git Put optimised substr assignment in void context 24fcb59fc optimised substr assignment in void context down to four-arg substr, causing considerable speed-up, but did not take the extra step of marking the substr op itself as being in void context, so pp_substr was still constructing a return value. This commit speed things up just a tiny bit more. --- diff --git a/op.c b/op.c index 1ed3dae..e353015 100644 --- a/op.c +++ b/op.c @@ -10315,6 +10315,8 @@ Perl_rpeep(pTHX_ register OP *o) cBINOPx(left)->op_first->op_sibling; cBINOPx(left)->op_first->op_sibling = right; left->op_private |= OPpSUBSTR_REPL_FIRST; + left->op_flags = + (o->op_flags & ~OPf_WANT) | OPf_WANT_VOID; } } }