Created
June 22, 2017 21:37
-
-
Save Util/e3b572f082de509cb7dcfcc86deb99ef 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
#!env perl6 | |
use v6; | |
$*ERR.print("Benchmark ", 'Miltiplier', ": "); | |
my $stime = now; | |
my $max_l = 20_000; | |
say :$max_l.perl; | |
my @l = 1..$max_l; # Hmmm. 2x here increases runtime by 4x | |
my $n; | |
for (^100) { # OK 10x here increases runtime by 10x | |
$n = [*] @l; | |
} | |
say "Run time: ", now - $stime; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment