Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created June 3, 2017 19:46
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/3fc5343428c1eefc0bb532e7d4e724f4 to your computer and use it in GitHub Desktop.
Save Whateverable/3fc5343428c1eefc0bb532e7d4e724f4 to your computer and use it in GitHub Desktop.
benchable6
compare HEAD sub fib { my ($i) = @_; my @v = [1,1,1]; @v[$i%3] = 0; while $i-- { @v[$i%3] = @v[($i+1)%3] + @v[($i+2)%3] }; @v[0] }; say fib(1000); ||| sub fib { my ($i) = @_; my @v = [1,1,1]; @v[$i%3] = 0; while $i-- { @v[$i%3] = @v[($i+1)%3] + @v[($i+2)%3] }; @v[0] }; fib(1000);
¦HEAD: «Benchmark:
Timing 10 iterations of 0, 1...
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
0: 0.0484 wallclock secs @ 206.5407/s (n=10)
(warning: too few iterations for a reliable count)
1: 0.0389 wallclock secs @ 256.9502/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 | 257/s | -- | 24% |
| 0 | 207/s | -20% | -- |
--------------------------»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment