[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Using unpack() twice in a single function call
- From: Mike Pall <mikelu-0608@...>
- Date: Fri, 4 Aug 2006 21:58:47 +0200
Hi,
Javier Guerra wrote:
> it might be interesting to compare the speed of t[#t+1]=exp versus
> table.insert (t, exp), since it's in the inner loop a small difference could
> be significant.
http://lua-users.org/lists/lua-l/2005-09/msg00130.html
About the original question: if the length and the number of
tables is fixed it's much faster to use: a[1], a[2], b[1], b[2].
Avoid overdesign when a simple solution fulfills your needs.
Bye,
Mike