[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Varargs efficiency
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sat, 18 Apr 2015 09:48:34 +0200
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).