Created
March 31, 2018 12:36
-
-
Save Whateverable/0f9553ea25bb4b6af4f721733de3061e 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 my class A { has $.payload; method instance { state $instance = self.bless; }; method modify($a) { $!payload = $a; }; submethod new{!!!} }; A.instance for ^1000000; ||| my class A { my $instance; has $.payload; method instance { unless $instance.defined { $instance = self.bless; }; $instance }; method modify($a) { $!payload = $a; }; submethod new{!!!} }; A.instance for ^1000000; |
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... | |
0: 1.5086 wallclock secs @ 6.6288/s (n=10) | |
1: 3.9938 wallclock secs @ 2.5039/s (n=10) | |
O---O--------O------O------O | |
| | Rate | 1 | 0 | | |
O===O========O======O======O | |
| 1 | 2.50/s | -- | -62% | | |
| 0 | 6.63/s | 165% | -- | | |
---------------------------- | |
» |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment