Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created March 25, 2018 15:15
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/a867380ae5c7004b989b7fc74dc34e82 to your computer and use it in GitHub Desktop.
Save Whateverable/a867380ae5c7004b989b7fc74dc34e82 to your computer and use it in GitHub Desktop.
benchable6
compare HEAD use nqp; my int $a = 0; my int $b = 10; nqp::if(nqp::isle_i($a, $b),$a,$b) for ^10000; ||| my int $a = 0; my int $b = 10; min($a,$b) for ^10000; ||| my int $a = 0; my $b = 10; $a < $b ?? $a !! $b for ^10000;
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1, 2...
0: 0.0313 wallclock secs @ 319.8692/s (n=10)
(warning: too few iterations for a reliable count)
1: 0.8127 wallclock secs @ 12.3041/s (n=10)
(warning: too few iterations for a reliable count)
2: 0.0348 wallclock secs @ 287.4989/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 | 12.3/s | -- | -96% | -96% |
| 0 | 320/s | 2500% | -- | 11% |
| 2 | 288/s | 2237% | -10% | -- |
------------------------------------
»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment