diff options
author | David Mitchell <davem@iabyn.com> | 2016-11-15 08:22:48 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-11-16 09:54:33 +0000 |
commit | 90303eefab11f53890ba7378a38c90ca58b20072 (patch) | |
tree | f3b1ac9390f08dfd27eb3393cea43da2536f364a | |
parent | 945fff052a1ae1a94b53e9255561aa632a67259d (diff) | |
download | perl-90303eefab11f53890ba7378a38c90ca58b20072.tar.gz |
perf/benchmarks: tidy scalar assign benchmarks
rename them from expr::assign::* to expr::sassign::* so as to more easily
distinguish them from expr::aassign::, and move them to the correct place
in the file
-rw-r--r-- | t/perf/benchmarks | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/t/perf/benchmarks b/t/perf/benchmarks index 5726c98377..6dfe442d3c 100644 --- a/t/perf/benchmarks +++ b/t/perf/benchmarks @@ -199,34 +199,6 @@ code => '$h{$k1}[$i]{$k2}', }, - - 'expr::assign::scalar_lex_int' => { - desc => 'lexical $x = 1', - setup => 'my $x', - code => '$x = 1', - }, - 'expr::assign::scalar_lex_str' => { - desc => 'lexical $x = "abc"', - setup => 'my $x', - code => '$x = "abc"', - }, - 'expr::assign::scalar_lex_strint' => { - desc => 'lexical $x = 1 where $x was previously a string', - setup => 'my $x = "abc"', - code => '$x = 1', - }, - 'expr::assign::scalar_lex_intstr' => { - desc => 'lexical $x = "abc" where $x was previously an int', - setup => 'my $x = 1;', - code => '$x = "abc"', - }, - 'expr::assign::2list_lex' => { - desc => 'lexical ($x, $y) = (1, 2)', - setup => 'my ($x, $y)', - code => '($x, $y) = (1, 2)', - }, - - 'expr::hash::lex_1const' => { desc => 'lexical $hash{const}', setup => 'my %h = ("foo" => 1)', @@ -716,6 +688,12 @@ code => '($x,$x) = (undef, $x)', }, + 'expr::aassign::2list_lex' => { + desc => 'lexical ($x, $y) = (1, 2)', + setup => 'my ($x, $y)', + code => '($x, $y) = (1, 2)', + }, + # array assign of strings 'expr::aassign::la_3s' => { @@ -890,6 +868,32 @@ + # scalar assign, OP_SASSIGN + + + 'expr::sassign::scalar_lex_int' => { + desc => 'lexical $x = 1', + setup => 'my $x', + code => '$x = 1', + }, + 'expr::sassign::scalar_lex_str' => { + desc => 'lexical $x = "abc"', + setup => 'my $x', + code => '$x = "abc"', + }, + 'expr::sassign::scalar_lex_strint' => { + desc => 'lexical $x = 1 where $x was previously a string', + setup => 'my $x = "abc"', + code => '$x = 1', + }, + 'expr::sassign::scalar_lex_intstr' => { + desc => 'lexical $x = "abc" where $x was previously an int', + setup => 'my $x = 1;', + code => '$x = "abc"', + }, + + + # using a const string as second arg to index triggers using FBM. # the FBM matcher special-cases 1,2-byte strings. # |