[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Lua 5.2] luaL_ref and the LUA_RIDX_* fields
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 10 May 2010 10:18:06 -0300
> I was looking over the lua-5.2-work2 code and noticed that luaL_ref
> ignores the first 3 indices in the table array. This assumes that the
> table being worked on is the registry (because the first three indices
> are the new LUA_RIDX_* values). Is this not a bad assumption as for
> other tables this wastes 3 slots which could conceivably bloat memory
> usage or cause keys to be in the hash part of a table (leading to
> poorer performance)?
Yes.
-- Roberto