[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: luac -O
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 1 Aug 2000 22:24:01 -0300 (EST)
>From firstname.lastname@example.org Tue Aug 1 19:23:15 2000
>From: Steve Dekorte <email@example.com>
>I noticed that luac has a optimize option.
>When I do a dofile() on a uncompiled lua file or dostring() on a string
>in Lua, are they compiled optimized in the same way as luac -O?
No. However, there's not much difference, because all that -O in luac
rellay does is to compact string and floating point numbers tables in each
function. The bytecode remains the same (except that -O removes debug info).
Moreover, 4.0 contains a new code generator that generates very good code,
wiht several optimizations.
luac -O is mainly used for large metafiles, with many constants. The table
compaction that -O does is only needed because the parser does not expend
too much effort on trying not to repeat constants, and this affects only
I'll probably remove -O from luac 4.0 and do it always.
So, bottom line, -O does not generate better bytecode at all, which is what
you seem to be worrying about.