[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: LUA intermediate code
- From: Nick Trout <Nick.Trout@...>
- Date: Mon, 24 Jun 2002 10:36:01 +0100
> I integrate LUA with my program using huge of equations in
> LUA, I am looking
> some way to execute faster and used less memory and database
> volume to store
> the equations.
> Any one know about ability to pre-compile and load
> intermediate code in LUA.
> Is possible to pre-compile LUA program to intermediate code,
> then store
> that code in database,
> later load it to run in LUA?
You can use luac to compile code into binary VM form, then you can execute
this (but TBH the Lua compiler is very quick so you must have an enormous
quantity of code!) You can then use bin2c to turn the binary into a file
which you can just include in your code to save loading the file.
If you'd like an example, have a look at http://doris.sf.net/