[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.1 (work1) now available
- From: Xavier Wang <weasley.wx@...>
- Date: Fri, 23 Mar 2012 00:24:00 +0800
2012/3/22 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
>> Indeed. I'm pretty sure that I use very long strings as index all
>> over the place. But does this patch indeed prevent long strings to
>> be unique indices? For me the interning of strings is one of the
>> charms of Lua.
>
> This patch does not change anything in the semantics of Lua. The
> interning of strings always has been and continues to be invisible to
> the programmer. It only afects performance, in both directions.
> (There is a cost for interning a string.)
>
> So, the question is: thus the savings in not interning some strings
> compensates the losses in performance in indexing some strings? The only
> way that I see to answer that is profiling real programs.
>
> -- Roberto
>
but this patch changed that the pointer returned by lua_pushlstring of
the same string are the same.... maybe this will cause trouble :-(