[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Speed of #t
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 13 Dec 2010 10:44:54 -0200
> Likely I'm a bit naive about this. But couldn't we just define for #
> operator to simply return the size of the array part?
Like I tried to explain earlier [1], the array part is just an implementation
detail. Even if the table is used as an array without holes, some of it may
end up in the hash part. Read the code [2].
[1] http://lua-users.org/lists/lua-l/2010-12/msg00400.html
[2] http://www.lua.org/source/5.1/ltable.c.html#luaH_getn
- References:
- Re: [ANN] Lua 5.2.0 (alpha) now available, Enrico Colombini
- Re: [ANN] Lua 5.2.0 (alpha) now available, steve donovan
- Re: [ANN] Lua 5.2.0 (alpha) now available, Geoff Leyland
- Re: [ANN] Lua 5.2.0 (alpha) now available, Enrico Colombini
- Re: [ANN] Lua 5.2.0 (alpha) now available, Peter Cawley
- Re: [ANN] Lua 5.2.0 (alpha) now available, Dirk Laurie
- Re: [ANN] Lua 5.2.0 (alpha) now available, Enrico Colombini
- Speed of #t (was: Re: [ANN] Lua 5.2.0 (alpha) now available, Dirk Laurie
- Re: Speed of #t, Enrico Colombini
- Re: Speed of #t, Axel Kittenberger