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
{
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;
{
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);