lua-users home
lua-l archive

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

On Thu, Jun 23, 2016 at 11:30 AM, Dirk Laurie <> wrote:

> It is in fact slightly faster with this example to use a variadic function (perhaps because the table is local at a shallower level?), but not very much.

So for n > 9, there is no reason to prefer select over {...}.

> The moment that you put an upper bound on n, there is no more any theoretical distinction between O(1), O(n) and O(n²).

In practical computer science, there is ALWAYS an upper bound. Just like the tests so far ALL had it.

> If the upper bound is small enough (and I'd say in this case that anything less than LUA_MINSTACK qualifies on that score), there is no practical distinction either.

I'd say we should just see the facts, the whole nine of them :)