Skip to content

Instantly share code, notes, and snippets.

@Util
Created June 22, 2017 21:37
Show Gist options
  • Save Util/e3b572f082de509cb7dcfcc86deb99ef to your computer and use it in GitHub Desktop.
Save Util/e3b572f082de509cb7dcfcc86deb99ef to your computer and use it in GitHub Desktop.
#!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