Skip to content

Commit

Permalink
Bump the margin of a performance test
Browse files Browse the repository at this point in the history
According to the original issue one of the variants wasn't simply
slower but rather used to hang. To test for the hang, the margin can
be relatively large. Currently the difference is about 2x, which means
that the test flapped depending on the system's load. Bumping it to 5x
should be good enough in most of the cases.

Resolves GH-3065.
  • Loading branch information
AlexDaniel committed Jul 25, 2019
1 parent e18b4f3 commit bd29d3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/08-performance/99-misc.t
Expand Up @@ -33,6 +33,6 @@ plan 4 - $skip;
unless $skip { # https://github.com/rakudo/rakudo/issues/1740
my $t-plain = { (^∞).grep(*.is-prime)[1000]; now - ENTER now }();
my $t-hyper = { (^∞).hyper.grep(*.is-prime)[1000]; now - ENTER now }();
cmp-ok $t-hyper, '', $t-plain*2,
cmp-ok $t-hyper, '', $t-plain*5,
'hypered .grep .is-prime is not hugely slower than plain grep';
}

0 comments on commit bd29d3f

Please sign in to comment.