# New Ticket Created by  Daniel Green 
# Please include the string:  [perl #127881]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127881 >


'@array[0, 3, 7]' is much slower than '(@array[0], @array[3], @array[7])'


time perl6 -e 'my @a = ^500;my @f;my $s = @a.elems;loop (my $i1 = 0; $i1 <
$s-1; $i1++) { loop (my $i2 = $i1+1; $i2 < $s; $i2++) { @f.push(@a[$i1,
$i2]) } };'

real    0m14.974s
user    0m14.947s
sys     0m0.017s


time perl6 -e 'my @a = ^500;my @f;my $s = @a.elems;loop (my $i1 = 0; $i1 <
$s-1; $i1++) { loop (my $i2 = $i1+1; $i2 < $s; $i2++) { @f.push((@a[$i1],
@a[$i2])) } };'

real    0m0.897s
user    0m0.877s
sys     0m0.017s


With Rakudo version 2016.03 built on MoarVM version 2016.03

Dan

Reply via email to