> On 22 Nov 2017, at 19:31, Timo Paulssen via RT
> wrote:
> On Mon, 20 Nov 2017 12:13:47 -0800, ronaldxs wrote:
>> What about a native perl6 range loop? Couldn't there be some way for
>> Perl 6 / Rakudo to generate code competitive on a small range with the
>>
> On 22 Nov 2017, at 19:31, Timo Paulssen via RT
> wrote:
> On Mon, 20 Nov 2017 12:13:47 -0800, ronaldxs wrote:
>> What about a native perl6 range loop? Couldn't there be some way for
>> Perl 6 / Rakudo to generate code competitive on a small range with the
>>
On Mon, 20 Nov 2017 12:13:47 -0800, ronaldxs wrote:
> What about a native perl6 range loop? Couldn't there be some way for
> Perl 6 / Rakudo to generate code competitive on a small range with the
> "native-loop" example?
>
> perl6 -e '
> {
> my int ($a, $one, $three) = (42, 1, 3);
>
What about a native perl6 range loop? Couldn't there be some way for Perl 6 /
Rakudo to generate code competitive on a small range with the "native-loop"
example?
perl6 -e '
{
my int ($a, $one, $three) = (42, 1, 3);
for ^10_000_000 { $a += $one + $a%$three };
say
For comparison to march on the same comp:
bash-3.2$ perl6 perf.p6
perl6-loop: 63.0037058
c-loop: 76.86853305 (0.82 times faster)
native-loop: 0.2170930 (354.08 times faster)
perl6 loops are faster. c style loops are slower. Native loops are even
faster relative to the others (for me).
We can
For comparison to march on the same comp:
bash-3.2$ perl6 perf.p6
perl6-loop: 63.0037058
c-loop: 76.86853305 (0.82 times faster)
native-loop: 0.2170930 (354.08 times faster)
perl6 loops are faster. c style loops are slower. Native loops are even
faster relative to the others (for me).
We can
On Sun, 12 Mar 2017 07:27:37 -0700, allber...@gmail.com wrote:
> On Sun, Mar 12, 2017 at 12:48 AM, Lloyd Fournier
> wrote:
>
> > perl6-loop: 84.8739988
> > c-loop: 67.65849241 (1.25 times faster)
> > native-loop: 0.4981954 (135.81 times faster)
> >
>
> Still quite a lot
On Sun, Mar 12, 2017 at 12:48 AM, Lloyd Fournier
wrote:
> perl6-loop: 84.8739988
> c-loop: 67.65849241 (1.25 times faster)
> native-loop: 0.4981954 (135.81 times faster)
>
Still quite a lot of optimization to be done on that front. WRT native int,
one of the issues is
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)
# 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
10 matches
Mail list logo