lua-users home
lua-l archive

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


On Thu, Jul 14, 2016 at 5:49 PM, Philipp Janda <siffiejoe@gmx.net> wrote:
Am 14.07.2016 um 14:22 schröbte Egor Skriptunoff:
On Thu, Jul 14, 2016 at 2:01 PM, Philipp Janda <siffiejoe@gmx.net> wrote:

What performance penalty?

Lua pushes all the arguments to the stack to invoke S(1,2,3),
and inside S() Lua pushes them AGAIN for constructing a table.
"VARARG" bytecode is not O(1) instruction, it was discussed earlier in this
list.

There's no VARARG bytecode involved in this case, it's just a plain function call.

Please show your implementation of array constructor S() which does not have VARARG bytecode inside.
;-)