lua-users home
lua-l archive

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


2015-04-18 4:16 GMT+02:00 Soni L. <fakedme@gmail.com>:

> How are varargs implemented? Are they array-backed,
> or linkedlist-backed? I'd think a linkedlist-backed approach
> would be better/faster:

Array, i.e. a consecutive block on the main stack, in the frame
belonging to the calling function. One of the advantages of so
doing is that select(n,...) is O(1), whereas in a list-based approach
it would be O(n).