[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Memory usage stats for 5.2 vs 5.3
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 13 Jan 2015 11:16:39 -0200
> (looks at 5.3 lobject.h source) So this is to simulate the cost of
> adding "struct TString *hnext" in TString?
> 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.