js-mythbusters
js-mythbusters copied to clipboard
Add DOM tips
- Caching DOM selector
- moar
Related: http://www.w3schools.com/js/js_performance.asp
I'm sure that @rstacruz know more tips in this are than me 😄 .
don't use variables
AFAIK, this isn't always true. Sometimes it might be faster to have a variable in v8. I don't have a link to point to info on this, might have to benchmark it :)
By the way, have a look at github.com/codemix/fast.js :)
yes, I don't like the don't use variables
tip. I think that is related more with the fact of don't use a variable that don't alive the necessary time to be cached by v8.