From d72a08cef7cdd5dc1701378ef61657bcd4fee58e Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Mon, 5 Dec 2011 12:55:57 -0800 Subject: [PATCH] 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. --- op.c | 2 ++ 1 file changed, 2 insertions(+) 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; } } } -- 2.7.4