Possible Duplicate:
Is a closure for dereferencing variables useful?
I've come across an information that because of the way that variable look up works in JavaScript i can gain a performance increase in some situations if i copy the variable i'd otherwise have to look up in a scope chain to a local variable for further access. Are there any general guidelines for this? Creating variables costs too. Is there a way to benchmark access times?
I'm not this paranoid about performance, but i like to stay aware of these things.