>In lua tables, fields (with string-indices) are accessed in
>constant time.
>
>What about the elements of an array (using tables of course)?
>Constant time or linear?
If by array you mean a table indexed with integers, then yes, it's constant
time. Table accesses are done in constant time no matter what type of index.
--lhf