lua-users home
lua-l archive

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


> Each of the input lua scripts have the same 5 or 6 strings again and
> again, so I was thinking that if string pooling happens, perhaps that
> would reduce the size.

The Lua compiler already optimizes all constants used in a function and
so only one copy of each string exists per function. However, different
functions, even if defined in the same chunk, do not share constants
(strings, in particular).

Unless you have megabytes of strings, there is not much to be gained by
reducing the size of precompiled programas, unless space is really at
a premium.