lua-users home
lua-l archive

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

2014-03-06 9:30 GMT+02:00  <>:

> 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.

> Or in other words:
> Shoud I change a lookup table in C
> v = tab[k]; // with k = 0 to n
> in lua to
> v = tab[k+1]

The possibilities for error are so great that I never do that.