lua-users home
lua-l archive

Re: 5.2 work3 manual

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2010年5月25日, Juris Kalnins wrote:
>
> When resizing array part, link all nil nodes into firstNil list;
> then #t is:
> *firstNil ? #t == array - firstNil : sizearray;
>
> And you have O(1) #t, plus amortized O(1) cost of list upkeep.
Not if you need to insert a nil in the middle of the list.
Tony.
-- 
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
FORTH TYNE DOGGER: VARIABLE 3 OR 4. SLIGHT OR MODERATE. SHOWERS. GOOD.

AltStyle によって変換されたページ (->オリジナル) /