Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created March 31, 2018 11:34
Show Gist options
  • Save Whateverable/d7e83b3b2d257dc705951e0e2265bf90 to your computer and use it in GitHub Desktop.
Save Whateverable/d7e83b3b2d257dc705951e0e2265bf90 to your computer and use it in GitHub Desktop.
benchable6
compare HEAD say (0..1).roll(100_000) ||| say Bool.roll.Int xx 100_000
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1...
(0 0 1 0 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 1 1 0 0 0 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 0 0 1 1 0 1 0 1 1 1 0 ...)
(0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 1 1 0 1 0 0 0 1 1 0 0 1 0 0 1 1 1 0 0 0 1 1 0 1 1 1 0 0 0 1 ...)
(0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 1 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 1 0 1 1 0 1 1 0 1 1 1 1 1 1 ...)
(0 1 1 0 1 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 1 1 1 0 1 1 0 1 1 0 1 1 0 0 1 1 0 0 1 1 1 1 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 1 1 1 0 0 1 1 0 0 1 0 1 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 0 1 1 1 0 1 1 0 0 0 1 1 1 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 1 0 1 1 1 ...)
(1 0 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 0 1 1 1 0 1 0 1 1 0 1 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 1 0 1 1 0 1 1 1 1 1 0 0 1 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 0 ...)
1: 0.1344 wallclock secs @ 74.4309/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 | 74.4/s | -- | -78% |
| 0 | 331/s | 345% | -- |
----------------------------
»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment