View Single Post
01-25-13, 07:02 PM   #19
Barjack
A Black Drake
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 89
Originally Posted by Phanx View Post
If you think it's not more efficient to perform a table lookup once, store the result in a variable, and then consult the variable 10 times in the same function, versus performing the same table lookup 10 times in the same function, regardless of how many times you're calling the function, then there's nothing to "defend" or discuss, because we're not even speaking the same language.
Wow, that's totally what I think! Because I didn't explicitly say the exact opposite in my original comment or anything. Oh wait... or did I?

Originally Posted by Barjack
On the other hand, if that lookup has the potential to happen 10 times per function in a function that might happen 20 times per second during combat, then I personally would definitely consider making it local.
Oh. Huh. It turns out I did, actually, say exactly that. Wow. It's almost as if you're willing to attack someone for something they explicitly did not say, in addition to merely attacking people for writing code you haven't seen.
  Reply With Quote