diff options
author | David Mitchell <davem@iabyn.com> | 2016-11-24 09:40:44 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-11-24 13:42:22 +0000 |
commit | e03e82a04dda6a44b815f3367c69afb0e953dc91 (patch) | |
tree | 0af20bb6d6d86cda9bedc1c62ebcacde194e382a /t | |
parent | d24e3eb1402c1294265f99342e2ec0ecfd0f5d34 (diff) | |
download | perl-e03e82a04dda6a44b815f3367c69afb0e953dc91.tar.gz |
add sv_set_undef() API function
This function is equivalent to sv_setsv(sv, &PL_sv_undef), but more
efficient.
Also change the obvious places in the core to use the new idiom.
Diffstat (limited to 't')
-rw-r--r-- | t/perf/benchmarks | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/perf/benchmarks b/t/perf/benchmarks index 6386f47e1e..92411a23c9 100644 --- a/t/perf/benchmarks +++ b/t/perf/benchmarks @@ -320,6 +320,11 @@ setup => 'my ($x,$y,$z)', code => '($x,$y,$z) = ()', }, + 'expr::aassign::3lref_empty' => { + desc => 'three lexical ref vars assigned empty', + setup => 'my ($x,$y,$z); my $r = []; ', + code => '($x,$y,$z) = ($r,$r,$r); ($x,$y,$z) = ()', + }, 'expr::aassign::pa_empty' => { desc => 'package array assigned empty', setup => '', |