{"id":370,"date":"2010-11-15T13:14:34","date_gmt":"2010-11-15T02:14:34","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=370"},"modified":"2010-11-15T13:16:39","modified_gmt":"2010-11-15T02:16:39","slug":"multi-faceted-javascript-speed-improvements","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2010\/11\/15\/multi-faceted-javascript-speed-improvements\/","title":{"rendered":"Multi-faceted JavaScript speed improvements"},"content":{"rendered":"<p>Firefox 4.0 beta 7&#8217;s <a href=\"http:\/\/blog.mozilla.org\/blog\/2010\/11\/10\/fasten-your-seatbelts-latest-firefox-4-beta-boosts-speed-in-the-browser\/\">release announcement<\/a> was accompanied by the following graphs that show great improvements in JavaScript speed:<\/p>\n<p><a href=\"http:\/\/blog.mozilla.org\/nnethercote\/files\/2010\/11\/graphs_fx4b7.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-371 alignnone\" title=\"graphs_fx4b7\" src=\"http:\/\/blog.mozilla.org\/nnethercote\/files\/2010\/11\/graphs_fx4b7.png\" alt=\"Fx4b7 JavaScript speed-ups\" width=\"567\" height=\"251\" srcset=\"https:\/\/blog.mozilla.org\/nnethercote\/files\/2010\/11\/graphs_fx4b7.png 567w, https:\/\/blog.mozilla.org\/nnethercote\/files\/2010\/11\/graphs_fx4b7-300x132.png 300w\" sizes=\"(max-width: 567px) 100vw, 567px\" \/><\/a><\/p>\n<p>Impressive!\u00a0 The graphs claim speed-ups of 3x, 3x and 5x;\u00a0 by my calculations the more precise numbers are 3.49x, 2.94x and 5.24x.<\/p>\n<p>The Sunspider and V8bench results are no surprise to anyone who knows about J\u00e4gerMonkey and has been following <a href=\"http:\/\/arewefastyet.com\/\">AWFY<\/a>, but the excellent Kraken results really surprised me.\u00a0 Why?<\/p>\n<ul>\n<li>Sunspider and V8bench have been around for ages.\u00a0 They are the benchmarks most commonly used (for better or worse) to gauge JavaScript performance and so they have been the major drivers of performance improvements.\u00a0 To put it more bluntly, like all the other browser vendors, we tune for these benchmarks a lot. In contrast, Kraken was only released on September 14th, and so we&#8217;ve done very little tuning for it yet.<\/li>\n<li>Unlike Sunspider and V8bench, Kraken contains a lot of computationally intensive code such as image and audio processing. These benchmarks are dominated by tight loops containing numerous array accesses.\u00a0 As a result, they trace really well, and so even 4b7 spends most of its Kraken time (I&#8217;d estimate 90%+) in code generated by TraceMonkey, the trace JIT.<\/li>\n<\/ul>\n<p>We can draw two happy conclusions from Kraken&#8217;s improvement.<\/p>\n<ul>\n<li>Our speed-ups  apply widely, not just to Sunspider and V8bench.<\/li>\n<li>Our future performance eggs are not all in one basket: the JavaScript team has made and will continue to make great improvements to the non-J\u00e4gerMonkey parts of the JavaScript engine.<\/li>\n<\/ul>\n<p>Firefox 4.0 is going to be great release!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firefox 4.0 beta 7&#8217;s release announcement was accompanied by the following graphs that show great improvements in JavaScript speed: Impressive!\u00a0 The graphs claim speed-ups of 3x, 3x and 5x;\u00a0 by my calculations the more precise numbers are 3.49x, 2.94x and 5.24x. The Sunspider and V8bench results are no surprise to anyone who knows about J\u00e4gerMonkey [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,4543,311,467],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/370"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/users\/139"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/comments?post=370"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/370\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}