Originally Posted by haste
That doesn't throw an error.
Many small steps make a leap. It was really just meant as a minor tips on what you should avoid doing.
|
Here's something everyone should know: Don't code right before going to bed. :P
K, so as it turns out I was being a right idiot. My test function had (iterations, select) and a bunch of other variables, so naturally they overrode the select function like that.
As for the test data, what I reported was also wrong.
local _,class=UnitClass("player") -> ~4m times per second (off by a factor of 4! :P)
local class=select(2,UnitClass("player")) -> ~2.6m times per second
So yes, your data was pretty much right. Also, I absolutely think optimizing where possible is a good idea, and in this case it's not really much of a hassle either. MY point was that the difference is minimal for select, at least for a small amount of operations.