[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: Vaughan McAlley <ockegheim@...>
- Date: Thu, 6 May 2010 16:37:43 +1000
On 6 May 2010 14:15, Javier Guerra Giraldez <javier@guerrag.com> wrote:
>> 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
>
Is it something to do with the function being a closure? Does it store
all its constants as part of the closure, and not in the string table?
Vaughan