On Friday, Aug 22, Mozilla announced a new Just-In-Time (JIT) JavaScript compiler called TraceMonkey in Firefox that will significantly speed up the browser's JavaScript performance.
It will eventually replace Firefox's current SpiderMonkey JavaScript compiler. Mozilla's Interim Mike Shaver told PC Magazine that the new compiler can improve JavaScript performance by up to a factor of seven, and with more speed improvements down the road. JavaScript is increasingly important, not only because of more-demanding sites, but because much of the Firefox browser itself is coded in JavaScript.
Mozilla' Shaver hinted that TraceMonkey could one day eliminate the need for proprietary plug-ins such as Adobe's Flash and Microsoft's SilverLight in order for sites to incorporate highly interactive content such as web-based graphics editors. Ironically, the TraceMonkey team has produced a Flash demo showing TraceMonkey in action, manipulating images.
Said Mozilla's Shaver, "[With TraceMonkey we're] competing with native code rather than with scripting languages. People have been building sites under the assumption that JavaScript is slow. Image manipulation today is not feasible in JavaScript, but TraceMonkey changes that. We're at the very beginning of what we can do with tracing."
In unpublished PC Magazine testing using the popular SunSpider JavaScript benchmark, Firefox 3.1 already outperforms Internet Explorer 7 by a factor of 7, so the new technology will double that gap. Internet Explorer 8 Beta 1, too, is nearly half the speed of Firefox in the benchmark. The TraceMonkey Just-In-Time (JIT) JavaScript compiler uses a technique known as a "trace-tree" which isolates and compiles the most frequently used code, such as a loop, first, and "trees" out to other hot code. The tracing uses optimization based on that in Mozilla's Tamarin virtual machine project.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment