Created
August 16, 2019 16:25
-
-
Save Whateverable/0e4acc92e80490b6ee2b5827093f08b4 to your computer and use it in GitHub Desktop.
benchable6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compare HEAD sub foo($a,$b,$c,$d){my $e=$a;my $f=$b;my $g=$c;my $h=$d;$e++;$f++;$g++;$h++;$e+$f+$g+$h};my $s1=0; for ^500_000 -> $a,$b,$c,$d {$s1=foo($a,$b,$c,$d)}; say $s1; ||| sub bar($a is copy,$b is copy,$c is copy,$d is copy) {$a++;$b++;$c++;$d++;$a+$b+$c+$d};my $s2=0; for ^500_000 -> $a,$b,$c,$d {$s2=bar($a,$b,$c,$d)};say $s2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
¦HEAD: «Benchmark: | |
Timing 10 iterations of 0, 1... | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
0: 5.4206 wallclock secs @ 1.8448/s (n=10) | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1999994 | |
1: 15.2750 wallclock secs @ 0.6547/s (n=10) | |
O---O--------O------O------O | |
| | s/iter | 1 | 0 | | |
O===O========O======O======O | |
| 1 | 1.53 | -- | -65% | | |
| 0 | 0.542 | 182% | -- | | |
---------------------------- | |
» |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment