lua-users home
lua-l archive

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

> >I noticed that lua_getn() is not public anymore
> >what's the correct way to retrieve the same result in lua 5.0.
> See

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.