Firefox boosts speed with TraceMonkey

Firefox fans will soon be able to take advantage of much faster web applications thanks to a JavaScript engine overhaul.

The speed-enhancing component, dubbed TraceMonkey, features the addition of a new just-in-time compiler for JavaScript execution that will supersede the current SpiderMonkey compiler present in the browser. It aims to put JavaScript on a par with natively-compiled code so that certain applications cease to be as sluggish as they have been historically.

"Developer and user demand for performance is insatiable, and at Mozilla we demand it ourselves, since our application itself is largely and increasingly written in JavaScript. In addition to improving the performance of web applications, our work on JS performance in Firefox 3 made our own application snappier and more responsive," Mozilla's vice president of engineering Mike Shaver said in a blog post.

"We're not done. In addition to continuing to work on our existing JavaScript interpreter (some 20% improved over Firefox 3 already), we're also looking farther into the future of JS performance, and have some early news to share."

Mozilla is hoping that the other browser players will follow its lead.

In tests conducted so far, Mozilla claims that it has seen a massive speed leap in certain JavaScript operations using TraceMonkey compared to Firefox 3. Specifically, it cites a 22.2x increase on function calls over Firefox 3, a 37.5x increase in performance when it comes to global loops and a 20.8x increase in terms of closed loop performance.

TraceMonkey takes advantage of a UC Irvine-developed technique called trace trees' as well as building on contributions and code that have been shared with the Tamarin Tracing project.

"The goal of the TraceMonkey project which is still in its early stages is to take JavaScript performance to another level, where instead of competing against other interpreters, we start to compete against native code. Even with this very, very early version we're already seeing some promising results."

TraceMonkey is present in the alpha version of Firefox 3.1, which is due for final release by the end of the year. At present, the functionality is turned off by default and Mozilla has admitted that there are still "bugs to fix and an enormous number of optimisations still to choose from" before the leap from alpha to full-blown release can be made.

In separate news, users of Firefox 2.0 will now receive a prompt suggesting they upgrade to the latest version of the browser, according to a blog post by Mike Beltzner, the company's director of user experience.

Maggie Holland

Maggie has been a journalist since 1999, starting her career as an editorial assistant on then-weekly magazine Computing, before working her way up to senior reporter level. In 2006, just weeks before ITPro was launched, Maggie joined Dennis Publishing as a reporter. Having worked her way up to editor of ITPro, she was appointed group editor of CloudPro and ITPro in April 2012. She became the editorial director and took responsibility for ChannelPro, in 2016.

Her areas of particular interest, aside from cloud, include management and C-level issues, the business value of technology, green and environmental issues and careers to name but a few.