Re: [perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-11-23 Thread Elizabeth Mattijsen via RT
> 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 >>

Re: [perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-11-23 Thread Elizabeth Mattijsen
> 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 >>

[perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-11-22 Thread Timo Paulssen via RT
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); >

[perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-11-20 Thread Ron Schmidt via RT
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

Re: [perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-11-19 Thread Lloyd Fournier via RT
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

Re: [perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-11-19 Thread Lloyd Fournier
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

[perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-11-18 Thread Daniel Green via RT
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

Re: [perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-03-12 Thread Brandon Allbery
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

Re: [perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-03-11 Thread Lloyd Fournier
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)

[perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-03-11 Thread via RT
# 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