Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created March 31, 2018 11:58
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/1005566ecca425deaf9fbb510b8b6982 to your computer and use it in GitHub Desktop.
Save Whateverable/1005566ecca425deaf9fbb510b8b6982 to your computer and use it in GitHub Desktop.
benchable6
compare HEAD say (0..1).roll(100_000).sum ||| say +(0..1).roll(100_000).grep( so * )
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1...
50010
49926
50169
50083
49912
50066
49762
49885
49874
49756
0: 0.6386 wallclock secs @ 15.6587/s (n=10)
(warning: too few iterations for a reliable count)
50289
50155
50000
50049
50012
49751
49902
50166
49982
49686
1: 2.0376 wallclock secs @ 4.9077/s (n=10)
O---O--------O------O------O
| | Rate | 1 | 0 |
O===O========O======O======O
| 1 | 4.91/s | -- | -69% |
| 0 | 15.7/s | 219% | -- |
----------------------------
»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment