If you think that discrepancy is impressive you're going to love this. I
added a version to your example using native ints:
https://gist.github.com/LLFourn/8c3e895e789fab957355ce23c9420133
bash-3.2$ perl6 native-int-perf.p6
perl6-loop: 84.8739988
c-loop: 67.65849241 (1.25 times faster)
native-loop
# New Ticket Created by Michael Schaap
# Please include the string: [perl #130982]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=130982 >
Perl6-style simple a-to-b loops are often much slower than the
corresponding C-style l
# New Ticket Created by Elizabeth Mattijsen
# Please include the string: [perl #130980]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=130980 >
$ 6 'my $a = 0; ($a++,) Zxx 42; say $a’
0
$ 6 'my $a = 0; ($a++,) Xxx 42; say $a’
Fixed with https://github.com/rakudo/rakudo/commit/27dc7b155b , even better
fixed with https://github.com/rakudo/rakudo/commit/1e246665cd . Tests needed.
> On 11 Mar 2017, at 04:11, Daniel Green (via RT)
> wrote:
>
> # New Ticket Created by Daniel Green
> # Please include the string: [perl