[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: hpairs?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 30 Dec 2010 09:39:01 -0200
> I have personally replaced the Lua table implementation with an
> single-mechanism array-based hash table to reduce branching and memory
> consumption. Apart from serving as a hash table, when a table is used only
> as an array, the data structure will look like one automatically (a tight
> array of ordered numbers). Naturally, from the outside the language appears
> unchanged.
Doesn't that use more memory, because the hash must store the indices
of the elements too?
-- Roberto