diff options
author | David Mitchell <davem@iabyn.com> | 2015-08-13 15:01:23 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2015-08-17 11:16:07 +0100 |
commit | 90ce4d0578578878b213fa81e151eead287da29e (patch) | |
tree | ebaa50a3be59aef99a67a3388819cd84743f496d /pp_hot.c | |
parent | a5f48505593c7e1ca478de383e24d5cc2541f3ca (diff) | |
download | perl-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 'pp_hot.c')
0 files changed, 0 insertions, 0 deletions