lua-users home
lua-l archive

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


> This can be seen without benchmarking. The problem with variadic
> arguments is that every function call with them is O(n), where n is
> the number of arguments. Just the call, ignoring whatever the function
> does. [...]

This is true for non-variadic functions as well, as Lua has to prepare
the n arguments to the function. I think most calls in most languages
follow that rule. (Inline functions that do not use its parameters would
be a counter-example.)

-- Roberto