|
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.