lua-users home
lua-l archive

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


> For all we know (I have not actually perused the source code) the 
> internal data structure for t has some dating back to from Lua 5.0 
> that contains a field t.n, only we can no longer see it,

No, it does not.

> and uses that field, if present, as the first possibility to try
> when calculating #t.

No, it does not.

The internal data structure for a table contains the size of the array
part and the size of the hash part but those are not related to #t or
to the number of pairs in the table. See
	http://www.lua.org/source/5.1/lobject.h.html#Table
	http://www.lua.org/source/5.1/ltable.c.html#luaH_getn