Archive for the 'JavaScript' Category

Tracing the Web: Andreas Gal on the new TraceMonkey JavaScript engine

For the past two months Andreas Gal has been part of the Mozilla team working on a just-in-time (JIT) compiler for the JavaScript engine in Firefox. On August 22nd the project (code named “TraceMonkey”) was added to the main Firefox development code base.

Andreas writes, “TraceMonkey is a trace-based JIT compiler and it pushes the envelope on JavaScript performance. On average, we speed up Apple’s popular SunSpider benchmarks by a factor of 4.6 over the last release of Firefox. For the SunSpider ubench suite, which focuses on core JavaScript language features, we achieve a speedup of 22x. Whichever metric you chose to apply, Firefox now has the fastest JavaScript engine in the world.” Andreas’ post goes on to discuss the concepts and background behind TraceMonkey in detail, including dynamic compilation with traces, trace trees and nested trace trees, and type specialization. You can read the full article at Andreas’ weblog.

JavaScript, Performance, Platform development

TraceMonkey vs. V8: JavaScript performance results

JavaScript is an increasingly vital aspect of web browser performance since many web applications (web mail, online word processors, and so forth) rely heavily on complex JavaScript programs for their core functionality. In the past year, JavaScript performance has gone through somewhat of a renaissance, with massive strides being made by JavaScript developers working on several different projects. The two most recent developments come from Mozilla and Google — Mozilla’s new TraceMonkey engine that is part of Firefox 3.1 development, and Google’s new V8 engine that is part of the Google Chrome beta.

Brendan Eich has run some performance tests, and has posted the results of the head-to-head showdown in which he pitted the engines against each other using the SunSpider test suite on Windows XP and Windows Vista (Google Chrome is not currently available for either Mac or Linux). Brendan writes, “[TraceMonkey] win[s] by 1.28x and 1.19x respectively,” but adds that SunSpider is “one popular yet arguably non-representative benchmark suite.” He finishes by pointing out that “this contest is not a playoff where each contending VM is eliminated at any given hype-event point,” going on to sketch the rough outlines of the approach the team is taking to further improve TraceMonkey performance.

Brendan’s complete test results and commentary are available on his weblog. Further information about TraceMonkey and JavaScript performance is available through web posts by Mike Shaver, Andreas Gal, and John Resig.

Firefox 3, JavaScript, Performance, Platform development

« Prev - Next »