View Single Post
06-12-10, 03:25 PM   #8
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Originally Posted by Crepusculu View Post
and using the local reference to bypass the lookup time on the global function? That sounds like it might help a bit.
It won't. The difference in execution time of local vs global functions is trivial. The difference between them for me, over a million iterations, is .077 second. If a user is running at 60 FPS with a completely unthrottled OnUpdate running constantly, you're saving .077 second of execution time every 4.6 hours.

There's no serious flaw in localizing globals that you're going to use a lot, but there's really no tangible benefit unless you're trying to prevent the function from being tampered with outside of your addon.
  Reply With Quote