[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: lua 5.0 lua_getn
- From: "Joshua Jensen" <jjensen@...>
- Date: Fri, 23 Aug 2002 00:47:21 -0600
> >I noticed that lua_getn() is not public anymore
> >what's the correct way to retrieve the same result in lua 5.0.
>
> See http://lua-users.org/lists/lua-l/2002-08/msg00166.html
I just ran some benchmarks on this, and found that, for a 10,000 element
table, the new getn() is 18+ TIMES slower than the old lua_getn() (I
copied the old 5.0 work lua_getn() into my local 5.0 alpha codebase).
On the second pass, due to it storing n in the table, it is much faster,
but I just thought I'd mention it. I use lua_getn() A LOT in my code,
and the new way of calling it is much more difficult.
-Josh