lua-users home
lua-l archive

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

On 19 August 2016 at 11:22, ThePhD <> 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 "\0.not.touch\xE2\x98\xA2.size") for
> 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...?

Aren't you already iterating? and hence the cost is the `nil` check...
(with lua_isnil).
If you're already checking the lua_type of your values, it would be 'free'.