[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 16:01:30 +0000
On 18 March 2018 at 15:46, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>> 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.
>>
>> Here are some benchmarking results for a large number of table reads/writes vs. array reads/writes.
>>
>> [...]
>
> Among other problems, your implementation slows down table access,
> because every access first has to check whether the value is an array.
Indeed this extra check is a price one has to pay for having an array
type (or sub-type). In Ravi I give preference to table type for
standard Lua bytecodes, but a check is needed (I do use compiler flags
to make the table outcome a high probability when possible). For
extended bytecodes where more type information is available this is
not an issue.
I think performance wise there will be the cost of an additional check
in standard Lua, the same way the Integer sub-type caused additional
check for numeric types.
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
- Re: 5.4 with arrays patch (work in progress), Roberto Ierusalimschy