[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Returning nil vs returning nothing
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 29 Oct 2020 10:52:02 -0300
> 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