Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created September 2, 2019 12:19
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/01ca063d4c79fccca19084b71d5512ca to your computer and use it in GitHub Desktop.
Save Whateverable/01ca063d4c79fccca19084b71d5512ca to your computer and use it in GitHub Desktop.
benchable6
compare HEAD "Hello".comb[0] for ^100_000 ||| "Hello".substr(0, 1) for ^100_000
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1...
0: 2.7503 wallclock secs @ 3.6359/s (n=10)
1: 0.2168 wallclock secs @ 46.1221/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 | 46.1/s | -- | 1169% |
| 0 | 3.64/s | -92% | -- |
-----------------------------
»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment