lua-users home
lua-l archive

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

> First, why O(log(n))? Lua tables are hash tables, not balanced trees.
> Second, the table-based solution is still O(n) because it creates a new
> table with n elements each time. Anyway, Lua is not about micro
> optimizations.
> The benefit is compactness: you don't have to introduce any additional
> local variables.

True and true, sorry for the noise.