One of the most impressive features in Google's open source Chrome web browser is V8, a high-performance JavaScript virtual machine that was developed by a team of specialists in Denmark. Although Chrome's performance beats the current stable version of Firefox, benchmarks show that Mozilla's next-generation JavaScript engine actually outperforms V8.

Mozilla is using tracing optimization techniques and Adobe's open source nanojit to increase the execution speed of SpiderMonkey, the JavaScript runtime engine in the Firefox web browser. The new engine, which is called TraceMonkey, delivers unprecedented JavaScript performance. The new optimizations have already landed in the latest Firefox nightly builds (but still have to be manually enabled) and will likely be included in Firefox 3.1.

JavaScript creator and Mozilla CTO Brendan Eich ran the SunSpider JavaScript benchmarks against Chrome and the latest TraceMonkey-enabled Firefox build, which includes some recent improvements. The benchmarks show that TraceMonkey is clearly faster than Google's V8. Mozilla believes that the optimization technique used in TraceMonkey has the potential to unlock even more performance improvements.





Data source: Mozilla

"As we continue to trace unrecorded bytecode and operand combinations, we will only get faster," Eich wrote in a blog entry. "What spectators have to realize is that this contest is not a playoff where each contending VM is eliminated at any given hype-event point. We believe that Franz & Gal-style tracing has more 'headroom' than less aggressively speculative approaches, due to its ability to specialize code, making variables constant and eliminating dead code and conditions at runtime, based on the latent types inherent in almost all JavaScript programs."

Eich also praises Chrome. He says that the V8 JavaScript engine is "very-well engineered" and he describes the multiprocess design as "righteous".

The results of the benchmark show that Mozilla is still a powerful force to be reckoned with in the browser space and that they will continue to innovate and remain relevant as new companies enter the market.