[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lack of bytecode optimization in Lua
- From: Dibyendu Majumdar <mobile@...>
- Date: Mon, 13 Mar 2017 10:40:10 +0000
Hi Egor,
On 12 March 2017 at 20:35, Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:
> It seems that Lua does not make an attempt to optimize
> bytecode (probably to reduce LOC of Lua sources?)
>
It is more to do with the goals of the Lua compiler. It is designed to
compile very fast and very efficiently in terms of memory usage. There
is no intermediate AST generation. As Roberto has explained in his
talks, Lua is a scripting language, and is designed to process large
data scripts fast - for example see the bug list maintained by Roberto
(https://github.com/lua/lua/blob/master/bugs).
There is an interesting project to perform bytecode optimizations
(https://github.com/Nymphium/opeth); something like could be used an
optional post compilation step (I would like to do this in Ravi).
Regards
Dibyendu