[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua Observations/Questions
- From: Ken Rawlings <krawling@...>
- Date: Wed, 7 Jul 1999 19:37:29 -0500 (EST)
On Wed, 7 Jul 1999, Luiz Henrique de Figueiredo wrote:
> Lua 3.2 (to be released in a couple of days) has a new built-in function
> tinsert that does this. (You can try it now with 3.2 beta.)
Thanks, tinsert and tremove are exactly what I was looking for. Looking
at the documentation, though, i'm a little concerned, given the
lua equivalent for tinsert. That source implies that tinsert copies
every object at a given position(after the insert) to that position + 1,
so that l gets copied to l, making room for something at l.
Doesn't this make tinsert a O(n) operation, and thus prohibitive for
dynamic additions to large data sets?