[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PROPOSAL] a new function: table.proto()
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 4 May 2010 09:53:22 -0300
> pairs/ipairs has *nothing* to do with the fact that tables has two parts.
It's not well known that the array part is just an optimization: even
if the table only has integer keys from 1 to N, part or all of that
data may be stored in the hash part. See for instance
http://www.lua.org/source/5.1/ltable.c.html#luaH_getnum