Sunday, April 24, 2011

Video: Speed Up Your JavaScript

Lessons on optimization are always prone to becoming dated, but there are many in this video that will probably stand the test of time. Especially useful were the ones related to documentFragment (34:00) to reduce browser reflow. The scope chaining (5:30 to ~13:00) discussion makes it clear that local variables are always the best to use, especially when compared to globals or DOM element property references. Maybe JIT optimizing compilation is helping with some of these issues in the latest versions of the browsers. Brief Q & A related to benchmarking (51:00) and profiling (55:00).

http://www.youtube.com/watch?v=mHtdZgou0qU (Nicholas Zakas)

No comments: