lua-users home
lua-l archive

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


Am 01.08.2014 13:31 schröbte Luiz Henrique de Figueiredo:
Is there a reason why the protocol for `ipairs` has changed from
"iterate to first nil value" to "iterate to #table"? The first is well
defined for all tables, and runs in O(n), while the second needs
O(nlog(n)) time

It's O(n+log(n))=O(n) time.


Isn't `ipairsaux` (which in turn calls `luaL_len`) called for every iteration?