From: YAMASHINA Hio Date: Tue, 30 Aug 2005 17:17:23 +0000 (+0900) Subject: A suggestion by Yamashina Hio to speed up substitutions X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ff629d935fd2dba7977969e7922b9cd55cc75d2;p=p5sagit%2Fp5-mst-13.2.git A suggestion by Yamashina Hio to speed up substitutions with right-hand side expressions by freeing temporaries. See : Subject: s///ge; consumes PL_tmps_stack in its loop Message-Id: <20050830160113.9716.HIO@ymir.co.jp> p4raw-id: //depot/perl@26334 --- diff --git a/pp_ctl.c b/pp_ctl.c index b49a5b5..401f60f 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -207,6 +207,7 @@ PP(pp_substcont) if (!(cx->sb_rxtainted & 2) && SvTAINTED(TOPs)) cx->sb_rxtainted |= 2; sv_catsv(dstr, POPs); + FREETMPS; /* Prevent excess tmp stack */ /* Are we done */ if (cx->sb_once || !CALLREGEXEC(aTHX_ rx, s, cx->sb_strend, orig,