lua-users home
lua-l archive

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


On 4/22/2011 12:28 AM, Jeff Smith wrote:
Q1) What approx performance benefit should I expect in using a
byte code version of a program rather than the source code version
? I did a quick test on the PC, my test program shrunk from 91k
down to 59k when I ran it through luac. So that will save a few
mS, just moving the file around, reading it etc. Am I correct in
assuming when a Lua Src program runs, it first compiles to byte
code and then once that stage completes, you would expect
identical execution times between a byte code version and a source
version ? So the execution time saving is just the initial one off
compile time ?

See the last part of this page for a few primitive data points:
http://luasrcdiet.luaforge.net/

It's hardly noticeable unless the source file is very large. Once the bytecode is running, there is no difference anyway.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia