diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-16 10:51:26 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-16 10:51:26 +0000 |
commit | 403799bf19538009b2d9e762e57456168d29ca0e (patch) | |
tree | 6577d3b5ae8f035228ac66e53c3af4cc8f88fad3 /pad.c | |
parent | 249534c343ab758089ce40786709465e328c8b2d (diff) | |
download | perl-403799bf19538009b2d9e762e57456168d29ca0e.tar.gz |
In Perl_pad_new(), avoid calling av_fetch() for something we already know.
We've just stored padname and pad as the first two elements in padlist - so
calling av_fetch() is makework.
The code was the way it was because dd2155a49b710f23 moved the two halves from
disjoint locations into the same function adjacent to each other, but didn't
spot this subsequent optimisation.
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -214,9 +214,9 @@ Perl_pad_new(pTHX_ int flags) /* ... then update state variables */ - PL_comppad_name = MUTABLE_AV((*av_fetch(padlist, 0, FALSE))); - PL_comppad = MUTABLE_AV((*av_fetch(padlist, 1, FALSE))); - PL_curpad = AvARRAY(PL_comppad); + PL_comppad_name = padname; + PL_comppad = pad; + PL_curpad = AvARRAY(pad); if (! (flags & padnew_CLONE)) { PL_comppad_name_fill = 0; |