[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: void lua_resizetable
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 25 Mar 2009 13:44:36 -0300
> Right, I could use the registry table, I went down the route of using
> the luaL_ref function first, but they appeared to be down hash key
> lookups instead of array index lookups. For my 1000's of tables, this
> meant luaH_getstr showing up at the top of my profile runs, because it
> was iterating through keys to find the values after converting my
> carefully chosen numeric values into TValue objects.
No matter how your numeric keys are stored, Lua never uses luaH_getstr
to access them. luaH_getstr only works for string keys.