[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: fields and elements
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 6 Jan 2001 10:41:19 -0200 (EDT)
>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