[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.4.1 (rc1) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 7 Oct 2020 14:38:33 -0300
> Amortized cost of table insertion is O(n)
> http://lua-users.org/lists/lua-l/2020-09/msg00178.html
> It looks like a bug.
> Although the manual promises nothing about Lua interpreter speed,
> something like O(logn) is usually required for table operations.
I don't think it is wise to expect O(log n) as the worst case for table
operations. Most hash tables have a worst case O(n) for insertion and
retrieval, due to collisions.
-- Roberto