lua-users home
lua-l archive

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


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