[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Ideas about implementing a string type?
- From: David Kastrup <dak@...>
- Date: Thu, 29 Mar 2007 13:50:05 +0200
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.