lua-users home
lua-l archive

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


On 22/03/2012 16.57, Roberto Ierusalimschy wrote:
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.)

Yes, that is clear.

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.

That's a valid point and something that certainly needs to be done; I'm looking at the matter from a slightly different viewpoint: many things are configurable in Lua (either at compile time or at runtime) to achieve a better efficiency for a particolar purpose; it would be useful to still have the possibility to intern all strings.

--
  Enrico