[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (work1) now available
- From: Mark Hamburg <mark@...>
- Date: Sat, 9 Jan 2010 09:56:24 -0800
On Jan 9, 2010, at 9:39 AM, Quae Quack wrote:
> table.pack seems a very strange function to me: its a one liner in lua, and shouldn't be any faster to code in C...
> ---------------------------------------
> function table.pack ( ... ) return { n= select ( "#",...) , ... } end
It's going to be faster in C because C tends to be much better at dealing with varargs. The Lua version has to pass the arguments down to another function call which will then just count the number of values it was passed.
Mark