lua-users home
lua-l archive

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



Am 17.04.2020 um 23:43 schrieb Tim Hill:
> 
> We created a very similar system, with a very similar implementation, a few years back. We were able to reduce the startup times for a new Lua state from 2-3ms to about 50us, which was pretty dramatic (including loading various private libraries). Of course, you later paid a bit extra for the meltable hits when look-up DID occur for library functions, but in our application where the states were short-lived this tax was acceptable.
> 
> It’s been running in production now for some time very reliably :)
> 
> —Tim

How did you solve the problem that modules can be loaded twice, e.g.

local math1 = math; math = nil; local math2 = math

But interesting to hear that we invented the same thing ;)