Skip to content

Instantly share code, notes, and snippets.

@jnthn

jnthn/x.nqp Secret

Created July 25, 2018 16:11
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 jnthn/580ca984c63427b900ee43183fb18ae8 to your computer and use it in GitHub Desktop.
Save jnthn/580ca984c63427b900ee43183fb18ae8 to your computer and use it in GitHub Desktop.
class C {
has $!a;
}
sub foo() {
my $c := nqp::create(C);
nqp::bindattr($c, C, '$!a', 42);
nqp::getattr($c, C, '$!a');
}
my int $i := 0;
while $i++ < 10_000_000 {
foo();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment