Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created December 12, 2017 21:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Whateverable/99caf769b93eb6ccd22f0b7bbe278598 to your computer and use it in GitHub Desktop.
benchable6
compare HEAD my $a; (^9 X ^9).map( -> ($x, $y) { $a++ }); say $a; ||| my $a; (^9 X ^9).flat.map(-> $x, $y { $a++ }); say $a;
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1...
81
81
81
81
81
81
81
81
81
81
0: 0.0228 wallclock secs @ 439.5027/s (n=10)
(warning: too few iterations for a reliable count)
81
81
81
81
81
81
81
81
81
81
1: 0.0154 wallclock secs @ 649.6239/s (n=10)
(warning: too few iterations for a reliable count)
O---O-------O------O-----O
| | Rate | 1 | 0 |
O===O=======O======O=====O
| 1 | 650/s | -- | 48% |
| 0 | 440/s | -32% | -- |
--------------------------
»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment