Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created February 24, 2019 18:07
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/7235651a82ff79fd2dbd1a026fccfdf1 to your computer and use it in GitHub Desktop.
Save Whateverable/7235651a82ff79fd2dbd1a026fccfdf1 to your computer and use it in GitHub Desktop.
benchable6
compare HEAD my @a = ("a".."k").pick(*).join xx 10000; my $b; for @a -> $a { $b = $a.starts-with("b" | "j") }; ||| my @a = ("a".."k").pick(*).join xx 10000; my $b; for @a -> $a { $b = ($a.starts-with("b") || $a.starts-with("j")) };
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1...
0: 5.3323 wallclock secs @ 1.8754/s (n=10)
1: 3.6816 wallclock secs @ 2.7162/s (n=10)
O---O--------O-----O------O
| | Rate | 0 | 1 |
O===O========O=====O======O
| 0 | 1.88/s | -- | -31% |
| 1 | 2.72/s | 45% | -- |
---------------------------
»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment