here's a question about js performance:
in a function that loops several times/second, is there a performance hit when a local variable is repeatedly declared as such? i.e.
Code JavaScript:var blah = Object.doingStuff + ObjectFriend.doingOtherStuff;
assume that changes to that variable are happening in the function, and that new values in Object & ObjectFriend affect it.
does the environment think that 'blah' is a new variable *every* iteration? how could that be optimized if so?
just curious and i figured if someone answers it, it will help others. (i thought about it looking at such a loop in the animation chapter in simply javascript, e.g. expandAnimate p. 204)



Bookmarks