lua-users home
lua-l archive

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


Lua strings cause a bit of processing overhead when they have to be
passed between an embedded Lua and its hosting application.  Entering
a string into Lua entails hashing it and pooling it into the global
string table (at least that's how I understand the code).  Given that
most strings are not even used for table indices, would there be a
possibility to add something like "lazy strings"?

Such strings would not get hashed unless one used them as a table
index, and they would not get unified or copied either unless

While I would prefer this kind of behavior to be the default for Lua
strings (and might possibly try to code something like this for the
Lua interpreter used in LuaTeX), implementing this as a separate data
type and/or library might also be an option.

Ideas, suggestions?

David Kastrup