[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (alpha) now available
- From: Peter Cawley <lua@...>
- Date: Sun, 12 Dec 2010 19:33:02 +0000
On Sun, Dec 12, 2010 at 7:30 PM, Enrico Colombini <erix@erix.it> wrote:
> On 12/12/2010 19.57, Geoff Leyland wrote:
>>
>> t[1] is quicker than #t> 0, especially if t is a long array.
>
>> (Not my idea, Javier Guerra pointed this out in
>> http://lua-users.org/lists/lua-l/2008-03/msg00540.html)
>
> Interesting... I always thought #t required constant time.
#t can require linear time in the worst case, and (probably)
logarithmic time in the average case.