Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created August 27, 2017 17:39
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/2cc3f9e208e8c9b708b00b06df54f009 to your computer and use it in GitHub Desktop.
Save Whateverable/2cc3f9e208e8c9b708b00b06df54f009 to your computer and use it in GitHub Desktop.
benchable6
compare HEAD my $buf = Buf.new(1, 2, 3, 4); for ^100_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 ^100_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: 3.0736 wallclock secs @ 3.2535/s (n=10)
1: 3.4341 wallclock secs @ 2.9120/s (n=10)
O---O--------O-----O------O
| | Rate | 1 | 0 |
O===O========O=====O======O
| 1 | 2.91/s | -- | -10% |
| 0 | 3.25/s | 12% | -- |
---------------------------»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment