From f868229640881c69bc53c5781a48b40738e273cd Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Wed, 25 Nov 2015 11:18:38 +0000 Subject: 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 --- lib/Benchmark.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Benchmark.t') 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); -- cgit v1.2.1