Last active
March 18, 2018 17:12
-
-
Save MattOates/d65abcb0b89898c35beea95200c4ea0f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env perl6 | |
my Int $len = 16; | |
my $maxlen = 32768; | |
my $how-many =100000; | |
while $len < $maxlen { | |
my $start = now; | |
my int @ones[$len]; | |
for 1..$how-many { | |
loop (my int $i = 0; $i < $len; $i++) { | |
@ones[$i] = Bool.roll; | |
} | |
my $maxones = @ones.sum; | |
# say $maxones; | |
} | |
say "perl6-BitVector,$len,",now - $start; | |
$len = $len*2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment