lua-users home
lua-l archive

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

> > is the usage of a lookup table with keys from 0 to n less efficient compared
> > to 1 to n+1?
> Only the index 0 itself, which always is in the "hash" part.

Don't assume that all entries in a sequence are stored in the array part.
It may well happen that part of the sequence is in the hash part.

OTOH, you shouldn't need to care about these implementation details,
unless we're talking about n being *very* large, in which case you
probably have other concerns.