[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Shorten long boolean IF conditions?
- From: Axel Kittenberger <axkibe@...>
- Date: Fri, 19 Aug 2011 10:22:00 +0200
> 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.