[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Can I save size by dumping a table of chunks? (and, how do I do it?)
- From: Javier Guerra Giraldez <javier@...>
- Date: Wed, 5 May 2010 23:15:31 -0500
On Wed, May 5, 2010 at 9:21 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> 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).
no? i thought each string was unique lua_State-wide
--
Javier