lua-users home
lua-l archive

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



On 16-May-05, at 11:28 PM, Chris Marrin wrote:

Ok, so maybe they were thinking about the now defunct generational collector. At any rate, is there any officially sanctioned way of handling "atoms" or the equivalent?

There is no officially sanctioned way of exporting internal information. I guess that's the sad answer. Although the workarounds are not generally awful.

In any event, I can imagine implementations of Lua which would have precisely the property suggested by the refman with respect to strings. For example, a short string (for some definition of short) might be stored directly in the stack slot. With a bit of careful rearrangement, you could fit 11-15 characters in a stack slot (depending on what the minimum alignment of a pointer is on your 64-bit architecture, if any). That might significantly reduce contention on the string table, particularly as the aforementioned 64 bit architecture is likely to be able to do a 16-byte aligned comparison fairly rapidly. In fact, I've been tempted to try that.


What would upvalues be replaced with? Surely Lua is not abandoning closures! That is one thing that has gotten Lua a lot of press for being hip and cutting edge :-)

Function environments, apparently, now that CFunctions also have them. I don't believe that Lua will abandon closures, but CFunction upvalues might be regarded as a holdover.

R.