lua-users home
lua-l archive

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


2014-08-15 3:43 GMT+02:00 Jan Behrens <jbe-lua-l@public-software-group.org>:

> Here, t->sizearray is not equal to #t, is it?

Oops, you are right.

Still, as Roberto pointed out [1], the O(log n) cost of #t (which
is all in C, no calls, only macros -- this I have checked!) is
likely to be less than the O(1) cost of a Lua function call.

[1] http://lua-users.org/lists/lua-l/2014-08/msg00421.html