Re: Who is using modified Lua versions, what are they and why?

云风 Cloud Wu <[email protected]> Sat, 27 Jun 2026 14:55:15 +0800
Newsgroups gmane.comp.lang.lua.general
Message-ID <CAJnYMr1vEAu+GgQRfnJxQdf8p-hZzU7bfO2Ev0_zsn_hdJrFgw@mail.gmail.com>
'Sewbacca' via lua-l <[email protected]> 于2026年6月27日周六 08:55写道:
>
> Lua is small, readable and easily modifiable which are huge perks. However they only come in handy if you are in control of the application itself which is running Lua. If you rely on the default distributed Lua version, you can't just change the parser. Especially if you are writing modules, then you have very little control over the runtime.
>
> So out of curiosity: Who is using modified Lua versions, what are the modifications and why do you need them?

I maintain a modified Lua version to share function prototypes and
constant tables among multiple Lua states.
https://github.com/cloudwu/skynet/tree/master/3rd/lua

Since the Skynet framework may creates thousands of Lua states in the
same process, sharing Lua function prototypes can significantly reduce
memory usage and improve startup performance when spawning new Lua
states.

Constant data stored in Lua tables can also be shared across multiple
Lua states, enhancing memory efficiency.  Additionally, sharing
constant Lua tables can reduce garbage collection overhead and
accelerate the startup time of Lua states that require these data."

---
http://blog.codingnow.com

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/CAJnYMr1vEAu%2BGgQRfnJxQdf8p-hZzU7bfO2Ev0_zsn_hdJrFgw%40mail.gmail.com.