diff options
author | David Mitchell <davem@iabyn.com> | 2015-11-25 11:18:38 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2015-11-25 11:22:02 +0000 |
commit | f868229640881c69bc53c5781a48b40738e273cd (patch) | |
tree | aac61109d63a6376e77a23c40e611e411713575c /lib/Benchmark.t | |
parent | 093d5aa02ee8c407b373bd2ff9295cf61d195c3d (diff) | |
download | perl-f868229640881c69bc53c5781a48b40738e273cd.tar.gz |
Benchmark.t: fix marginal tests
Two tests fail a lot of smokes; those tests assert that two
code variants when one is faster than the other should show a percentage
difference > 0. Then the differences are slight, the percentage may round
down to zero and the test will fail. Reduce the likelihood of this my
making one code variant a lot slower than the other
Diffstat (limited to 'lib/Benchmark.t')
-rw-r--r-- | lib/Benchmark.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Benchmark.t b/lib/Benchmark.t index 7706bba011..1ba7becd6c 100644 --- a/lib/Benchmark.t +++ b/lib/Benchmark.t @@ -401,7 +401,7 @@ sub check_graph { { select(OUT); my $start = times; - my $chart = cmpthese( -0.1, { a => "\$i = sqrt(\$i++) * sqrt(\$i)", + my $chart = cmpthese( -0.1, { a => "\$i = sqrt(\$i++) * sqrt(\$i) for 1..10", b => "\$i = sqrt(\$i++)", }, "auto" ) ; my $end = times; @@ -425,7 +425,7 @@ sub check_graph { { select(OUT); my $start = times; - my $chart = cmpthese( -0.1, { a => "\$i = sqrt(\$i++) * sqrt(\$i)", + my $chart = cmpthese( -0.1, { a => "\$i = sqrt(\$i++) * sqrt(\$i) for 1..10", b => "\$i = sqrt(\$i++)" }); my $end = times; select(STDOUT); |