Originally Posted by Aanson
<snip>
Anyone know the better of these two? getn(self.Events) vs #self.Events? I expect it's probably negligible to the point of being irrelevant.
<snip>
|
The table.getn method was actually deprecated in Lua 5.1 in favor of the unary length operator (#). You should also be using pairs for dictionary-style tables. For array-style tables, you can use either ipairs or the (slightly faster) incremental loop.