lua-users home
lua-l archive

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

Mike Pall wrote:
> There's no way to do that without traversing the whole table. All
> shortcuts that try to infer something from e.g. #t or next() will
> fail under some circumstances.

I think you only need to traverse a hash part and stop when you find
a non-empty bucket. But you're right, that's still a linear search.