TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Know Your Engines - How to Make Your JavaScript Fast [pdf]

44 pointsby sharmajaialmost 14 years ago

4 comments

msiealmost 14 years ago
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?
评论 #2669774 未加载
jinushaunalmost 14 years ago
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.
__rkaup__almost 14 years ago
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?
评论 #2669404 未加载
评论 #2669776 未加载
ahoyherealmost 14 years ago
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.<p>That's why we open sourced our DOM performance inspection bookmarklet, DOM Monster:<p><a href="http://mir.aculo.us/2011/01/09/the-dom-monster-is-now-open-source/" rel="nofollow">http://mir.aculo.us/2011/01/09/the-dom-monster-is-now-open-s...</a><p>If you liked this presentation, you might enjoy the book I co-wrote with Thomas Fuchs (of Scriptaculous, Prototype.js, Emile, Zepto, &#38; Microjs fame): <a href="http://jsrocks.com" rel="nofollow">http://jsrocks.com</a>
评论 #2670834 未加载