[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Feedback on (awesome) performance of lua 5.4 (work1)
- From: Dibyendu Majumdar <mobile@...>
- Date: Sat, 17 Mar 2018 16:56:07 +0000
On 17 March 2018 at 14:53, Rodrigo Azevedo <rodrigoams@gmail.com> wrote:
>
> Question: Why the incremental Lua 5.4 performs better (CPU TIME) than Lua
> 5.2 or 5.3? My guess is the new VM instructions (what are the new ones?), am
> I right? or some optimization of the incremental gc? anything else?
>
Lua 5.4 has several optimizations for bytecodes that is used in
numeric programs - load, indexing, arithmetic ops codes, for num
opcodes etc. are specialized for situations where the parser can
detect numeric constants and infer types. For instance now there are
GETI/SETI opcodes for extracting/updating values table values where
the index key is an integer. The VM also has optimizations such as
avoiding operations not needed or minimizing the impact of those. The
net result is improved performance which is very welcome.
I am not sure whether your test reflects on the GC performance though
- why do you think the type of GC is relevant?
Regards
Dibyendu