summaryrefslogtreecommitdiff
path: root/scope.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-08-13 15:01:23 +0100
committerDavid Mitchell <davem@iabyn.com>2015-08-17 11:16:07 +0100
commit90ce4d0578578878b213fa81e151eead287da29e (patch)
treeebaa50a3be59aef99a67a3388819cd84743f496d /scope.h
parenta5f48505593c7e1ca478de383e24d5cc2541f3ca (diff)
downloadperl-90ce4d0578578878b213fa81e151eead287da29e.tar.gz
make my (...) = @_ non-OPpASSIGN_COMMON_RC1
Technically in my ($scalar,...) = @_ due to closure/goto tricks, its possible for $scalar to appear on both the LHS and RHS, so we currently set the OPpASSIGN_COMMON_RC1 flag. However, this imposes extra overhead; for example 5% extra instruction reads and 11% extra conditional branches for my ($x,$y,$z) = @_; Given what an important construct this is, disable this flag in the specific case of of only my's on the LHS and only @_ on the RHS. It's technically incorrect, but its the same behaviour we've always had (it was only the previous commit which made it safe but slower). We still set the OPpASSIGN_COMMON_AGG flag for my ($...,@a) = @_ since in the normal case this only adds the small additional runtime overhead of checking that @a is already empty.
Diffstat (limited to 'scope.h')
0 files changed, 0 insertions, 0 deletions