Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created April 4, 2018 12:28
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 Whateverable/e74345b3d61290a80a7cc0213604c849 to your computer and use it in GitHub Desktop.
Save Whateverable/e74345b3d61290a80a7cc0213604c849 to your computer and use it in GitHub Desktop.
benchable6
compare HEAD for ^100 X ^100 -> ($x,$y) { } ||| for ^100 -> $x { for ^100 -> $y { } } ||| my \a = gather for ^100 -> $x { for ^100 -> $y { take ($x,$y) } }; my $it = a.iterator; until (my \n := $it.pull-one) =:= IterationEnd { }
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1, 2...
0: 1.7635 wallclock secs @ 5.6707/s (n=10)
1: 0.0223 wallclock secs @ 447.8693/s (n=10)
(warning: too few iterations for a reliable count)
2: 0.3006 wallclock secs @ 33.2673/s (n=10)
(warning: too few iterations for a reliable count)
O---O--------O------O-------O-------O
| | Rate | 1 | 0 | 2 |
O===O========O======O=======O=======O
| 1 | 448/s | -- | 7798% | 1246% |
| 0 | 5.67/s | -99% | -- | -83% |
| 2 | 33.3/s | -93% | 487% | -- |
-------------------------------------
»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment