In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/22ade07d6a4f442c7a3e970195597fd0cb266e0d?hp=a6075c7300c497a2e670c1d26bb60551c0075e32>
- Log ----------------------------------------------------------------- commit 22ade07d6a4f442c7a3e970195597fd0cb266e0d Author: Steffen Mueller <[email protected]> Date: Wed Sep 12 14:52:46 2012 +0200 Save one NULL assignment per TMP This assignment looks really rather like overzealous cleanliness. It's a hot path. Now it's death by 999 cuts instead of 1000. ----------------------------------------------------------------------- Summary of changes: scope.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scope.c b/scope.c index e3b4c79..42e3af8 100644 --- a/scope.c +++ b/scope.c @@ -160,8 +160,13 @@ Perl_free_tmps(pTHX) /* XXX should tmps_floor live in cxstack? */ const I32 myfloor = PL_tmps_floor; while (PL_tmps_ix > myfloor) { /* clean up after last statement */ - SV* const sv = PL_tmps_stack[PL_tmps_ix]; - PL_tmps_stack[PL_tmps_ix--] = NULL; +#ifdef PERL_POISON + SV* const sv = PL_tmps_stack[PL_tmps_ix]; + PoisonWith(sv, 1, sizeof(SV *), 0xAB); + PL_tmps_ix--; +#else + SV* const sv = PL_tmps_stack[PL_tmps_ix--]; +#endif if (sv && sv != &PL_sv_undef) { SvTEMP_off(sv); SvREFCNT_dec(sv); /* note, can modify tmps_ix!!! */ -- Perl5 Master Repository
