Hopefully some javascript engine maker will open up their engines to either accept javascript or the statically-typed IL that the js gets compiled into. Then someone can write some statically-typed javascript-like language for us to use. Maybe, as a first step, allow some inline-IL in the javascript code?
Very in-depth write up of how browsers interpret Javascript and how your coding style affects performance. Some useful tips at the end, although one shouldn't be taking these tips to heart and optimising prematurely. A bad algorithm can make all this fine-tuning moot.
All these presentations about optimizing JavaScript are making me think there should be an alternative to JavaScript, especially if we want to move a bunch of software to the browser. Is this really not feasible?
And then there'd be slide decks about how to optimize that language. These tips are specific to javascript, but the concepts apply to any interpreted JIT language from my understanding.
There's a lot of practical things people can do to make their JS code faster, and a bunch of impractical things too (like unrolling loops). But based on our research/experience, a huge percentage of JavaScript-related web app slowness is actually caused by inefficient DOM structures and CSS styling. Believe it or not, simple DOM mistakes can dramatically slow down insertions, event handlers (like on-click), any kind of iteration (obviously) as well as animations.
That's why we open sourced our DOM performance inspection bookmarklet, DOM Monster:
If you liked this presentation, you might enjoy the book I co-wrote with Thomas Fuchs (of Scriptaculous, Prototype.js, Emile, Zepto, & Microjs fame): http://jsrocks.com