In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/851ffa6e66f5cbb2878b578e7d833b4d728c6975?hp=fd4402024b24e2932365e29708532aff07b488af>
- Log ----------------------------------------------------------------- commit 851ffa6e66f5cbb2878b578e7d833b4d728c6975 Author: Daniel Dragan <[email protected]> Date: Sat Dec 22 09:34:40 2012 -0500 remove some instruction bloat in S_find_uninit_var VC 2003 -O1 put down SvIV(cSVOPx_sv(kid)) twice in asm. Not sure why. Explicitly store the values to make it more obvious to the compiler to evaluate the SvIV only once, then do the branch, not do the negate branch, then in a negate branch do a SvIV. Result is less machine code read by the CPU. The .text section dropped 0xC01FF to 0xC018F after this change. ----------------------------------------------------------------------- Summary of changes: sv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sv.c b/sv.c index 3977204..3ac0a2b 100644 --- a/sv.c +++ b/sv.c @@ -14413,8 +14413,10 @@ S_find_uninit_var(pTHX_ const OP *const obase, const SV *const uninit_sv, break; } else { + SV * const opsv = cSVOPx_sv(kid); + const IV opsviv = SvIV(opsv); SV * const * const svp = av_fetch(MUTABLE_AV(sv), - negate ? - SvIV(cSVOPx_sv(kid)) : SvIV(cSVOPx_sv(kid)), + negate ? - opsviv : opsviv, FALSE); if (!svp || *svp != uninit_sv) break; -- Perl5 Master Repository
