Skip to content

Instantly share code, notes, and snippets.

@japhb
Created September 20, 2018 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save japhb/eb81ecc106fb08ff2e08c9be0e988ed4 to your computer and use it in GitHub Desktop.
Save japhb/eb81ecc106fb08ff2e08c9be0e988ed4 to your computer and use it in GitHub Desktop.
Bimodal Rakudo timings for simple loop
Rakudo 2018.09-WIP is showing extremely bimodal timing of a very simple loop
(nearly an order of magnitude difference between low and high timing clusters).
Rakudo from earlier in the 2018.09 development cycle:
$ 6
To exit type 'exit' or '^D'
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
5.80582401
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
45.1830434
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
5.9017766
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
43.1223572
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
5.85997011
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
5.87615198
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
42.9239945
> say $*PERL.compiler.version
v2018.08.28.gfc.23.b.197.a
Rakudo at HEAD:
$ 6
To exit type 'exit' or '^D'
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
42.95510365
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
43.25355073
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
5.8162399
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
43.79878099
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
5.85031714
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
5.69550811
> my int $foo; my int $bar; while $foo < 1_000_000_000 { $foo = $foo + 1; $bar = $bar + 1 }; say now - INIT now;
41.9268849
> say $*PERL.compiler.version
v2018.08.125.g.38.b.198.c.99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment