[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.4 with arrays patch (work in progress)
- From: Dibyendu Majumdar <mobile@...>
- Date: Sun, 18 Mar 2018 14:44:45 +0000
On 18 March 2018 at 14:25, Petri Häkkinen <petrih3@gmail.com> wrote:
>>
>> Anyone willing to step up and write a patch for arrays? I bet it would solve the issues with #, make Lua code clearer about its intent and also give a nice perf boost. As arrays would be a new lang feature, existing code would not be affected at all.
>>
>> A good proof of concept and demonstration how it solves the issues might be all that is needed to convince Roberto et all that this is the right way to go ;-)
>>
>> Heck, this could be the killer feature of 6.0 that would make people stuck in 5.1 to jump aboard.
>>
>> If not, then at least we could drop this talk about arrays and move on.
>>
>> Any takers?
>>
>> Petri
>
> Well, I took a stab at it myself for some Sunday fun. It’s still very much work in progress, but the initial results seem promising.
>
> Code and benchmarks at: https://github.com/petrihakkinen/lua-array
>
Looks like we posted at the same time.
I see that you have created a new array type. My approach in Ravi is
to create sub types of Table (similar to how Integer sub type of
Number works). Having a separate type does have some advantages - one
can optimize the structure for arrays, for example.
BTW you also need to update all the Lua api functions so that they
work transparently on arrays.
Regards
Dibyendu
- References:
- [ANN] Lua 5.4.0 (work1) now available, Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.4.0 (work1) now available, Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.4.0 (work1) now available, Xavier Wang
- Re: [ANN] Lua 5.4.0 (work1) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.4.0 (work1) now available, Andrew Starks
- Re: [ANN] Lua 5.4.0 (work1) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.4.0 (work1) now available, Dibyendu Majumdar
- Re: [ANN] Lua 5.4.0 (work1) now available, Sean Conner
- Re: [ANN] Lua 5.4.0 (work1) now available, Petri Häkkinen
- 5.4 with arrays patch (work in progress), Petri Häkkinen