lua-users home
lua-l archive

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


> (looks at 5.3 lobject.h source) So this is to simulate the cost of
> adding "struct TString *hnext" in TString?

Exactly.


> It's interesting how much of an effect the TString member had on the
> usage of lua_newstate in 5.2.3-dummy-TString, I wouldn't have expected
> that many strings are constructed before luaL_openlibs or similar has
> been called.

'luaL_openlibs' creates lots of new strings, with the names of the
functions being registered.

This new field 'hnext' greatly simplifies the GC of strings (as they can
live in the 'allgc' list together with all other objects), but we can
revert to the old design if it proves too expensive.

-- Roberto