Originally Posted by SDPhantom
As far as using unpack() versus manually indexing tables, it depends on how you're indexing the table for each return and at some point, I would think unpack() would start to be more appealing, but no data exists to suggest at what point (if any) this will start to happen.
|
I did some benchmarking on this a while ago. I don't know whether
t[a][b][1], t[a][b][2], t[a][b][3] is faster than
unpack(t[a][b]) (though I'd guess it is) but I do know that
t[1], t[2], t[3] is
significantly faster than
unpack(t), so I would strongly advise using SDPhantom's alternative instead of using
unpack:
Originally Posted by SDPhantom
Code:
local points=ns.colors.cpoints[i]
cPoint:SetTexture(points[1], points[2], points[3])
|