lua-users home
lua-l archive

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


> For example, if you have a list of 10000 items, a lua table is going
> to store the keys 1 to 10000 and to store the values too.

This is a detail, but a Lua table will not store the keys in that
case. Since 5.0 Lua has an algorithm that automatically detects such
uses and stores those items in an array.

-- Roberto