|
On 19 August 2016 at 11:22, ThePhD <jm3689@columbia.edu> wrote:
> I don't suppose sneaking in some kind of ridiculous key name that includes
> null characters and other things that are vastly improbable for a real Lua
> user to use (something like "__detail.do.\0.not.touch\xE2\x98\xA2.size") for Aren't you already iterating? and hence the cost is the `nil` check...
> when I push the table and then pop the table, and using that MAYBE as a
> shortcut if it's present, and otherwise falling back to iterating until I
> hit a `nil` might be worth it...?
(with lua_isnil).
If you're already checking the lua_type of your values, it would be 'free'.