> that "array part" is an optimization that holds _some_ values, but
> it's not guaranteed that all integer keys are stored there.
Ah, okay, thanks for correcting me. Talking about optimizations, wouldn't say adding sizeints optimize functions like ipairs (with maybe slight overhead on adding new elements, and a little bit more memory consumption). And adding something like sizekeys you could then easily check if sizeints == sizekeys -> "is array", making it an optimization for Konstantin's problem (with possibility for internal optimizations as well). Or maybe this isn't too common, and can be worked on a Lua side as well (say having metatable that collects just that).