lua-users home
lua-l archive

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


> I guess it's entirely possible that one can binary search the array
> faster than a couple table lookups to find the cached value for getn.

That was the case last time we measured. (At least for small tables,
with up to some 200,000 elements...)


> And, of course, if getn wasn't caching before, then I'm entirely off
> base in this concern.

getn wasn't caching before, but table.insert was (it called setn).

-- Roberto