Skip to content

Instantly share code, notes, and snippets.

@samcv

samcv/time.nqp Secret

Created July 6, 2018 21:48
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 samcv/84266a6b5fc34af0ebd2470f5fc24937 to your computer and use it in GitHub Desktop.
Save samcv/84266a6b5fc34af0ebd2470f5fc24937 to your computer and use it in GitHub Desktop.
my %hash;
my int $num := 1000000;
my int $i := 0;
while $i++ < $num {
%hash{$i} := 1;
}
my @array := (2, 3, 4, 5, 6);
for @array {
$i := 0;
while $i < $num {
nqp::bindkey(%hash, $i, 1);
#%hash{$i} := 1;
$i := $num + $_;
}
$i := 0;
while $i < $num {
nqp::deletekey(%hash, $i);
$i := $num + $_;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment