lua-users home
lua-l archive

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


> 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