[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bytecode: Safe or not? / luac manual
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 31 Oct 2011 10:59:51 -0200
> In case of speed: I suppose the state of affairs is that bytecode is
> only loaded faster if not checked. Any speedadvantage to parsing is
> eaten up by through untrusted bytecode checking.
Not really. Parsing still takes longer. But of course all this only
appplies to large programs. For everything else, both loading and
parsing are quite fast.
> In case of size: how much smaller is bytecode compared to source code
> that is say precompile-stripped of comments etc. and gzipped if at
Bytecode can be larger. Size reduction is not a goal in precompiling.
The goals are faster loading, protecting source code from accidental
user changes, and off-line syntax checking. Another goal is to allow
hosts to reduce their footprint by omitting the parser engine (lexer,
parser, code generator).