lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hello all!
As I see from the source, current Lua off-line compiler (luac) uses
internal lua compiler to generate code for Lua VM. And internal
compiler, as stated, is trade-off between compilation speed and level
of optimisations, which is good for run-time compiler, but not the
case for off-line one. The off-line compiler does not have to take
into account compilation speed (well, almost, comparing to run-time
system), so maybe it worth creating different compiler for off-line
compilations, that will produce more efficient code than it's run-time

The main questions:
1) How much it is possible to optimize bytecode if not to take
compilation time into consideration (compared to current run-time
2) If gain from 1 of large enough, what is the effort required to
create and maintain additional compiler and if it worth it?
3) What are possible pitfalls in such approach?

Best regards,