Created
June 15, 2014 16:49
-
-
Save jnthn/2050e5ed6e8991e24e53 to your computer and use it in GitHub Desktop.
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
class A { | |
has $!a; | |
method BUILD(:$a) { | |
$!a := $a; | |
} | |
method a() { $!a } | |
} | |
sub foo($obj) { | |
$obj.a == 42 || nqp::die('oops'); | |
} | |
my int $i := 0; | |
my $x := A.new(a => 42); | |
while $i < 10000000 { | |
foo($x); | |
$i++; | |
} |
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
No spesh: 5.31 | |
Spesh (no inline): 4.73 | |
Spesh (inline): 3.83 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment