Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created August 27, 2017 17:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Whateverable/98a6b512027d4c3b8041c6758db3d068 to your computer and use it in GitHub Desktop.
benchable6
compare HEAD my $buf = Buf.new(1, 2, 3, 4); for ^10_000 { my int64 $a = $buf.AT-POS(0) + $buf.AT-POS(1) +< 8 + $buf.AT-POS(2) +< 16 + $buf.AT-POS(3) +< 24 } ||| my $buf = Buf.new(1, 2, 3, 4); for ^10_000 { my int64 $a = $buf.AT-POS(0) + $buf.AT-POS(1) * 64 + $buf.AT-POS(2) * 128 + $buf.AT-POS(3) * 192 }
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1...
0: 0.3334 wallclock secs @ 29.9977/s (n=10)
(warning: too few iterations for a reliable count)
1: 0.3554 wallclock secs @ 28.1360/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 | 28.1/s | -- | -6% |
| 0 | 30.0/s | 7% | -- |
-------------------------»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment