Mozilla Speeds Up JavaScript with TraceMonkey (
Page 1 of 3 )
Mozilla has revved up its SpiderMonkey JavaScript engine with a new just-in-time compiler. The TraceMonkey project boosts JavaScript performance by an order of magnitude. TraceMonkey is slated for release in Firefox 3.1 and is expected to also boost Canvas development.
The folks at Mozilla have souped up JavaScript with a new just-in-time compilation
scheme in a project known as TraceMonkey, which boosts JavaScript performance
as much as 22.5 times depending on which benchmarks and tests you use.
Like other dynamic languages such as Ruby and Perl, JavaScript has suffered
from issues of poor performance compared with statically typed languages.
TraceMonkey helps overcome those performance issues. Mike
Schroepfer, former vice president of engineering at Mozilla, who now works at
Facebook, developed a demo to show how TraceMonkey improves JavaScript
performance.
Moreover, in a blog post, Eich said, "I'm extremely pleased to announce
the launch of TraceMonkey, an evolution of Firefox's SpiderMonkey JavaScript
engine for Firefox 3.1 that uses a new kind of Just-In-Time (JIT) compiler to
boost JS performance by an order of magnitude or more."
In an interview with eWEEK, Eich said Mozilla began work on TraceMonkey just
over 60 days ago with the help of Andreas Gal of the University
of California, Irvine.
And TraceMonkey is slated for inclusion in Firefox 3.1, Eich said.
"For years, many of us have been salivating over the idea of JIT'ed
JavaScript in the browser. Adobe's JIT'ing Flash VM [virtual machine] showed a
preview of tremendous speed gains to be had, but we've had to wait until
SquirrelFish from WebKit to see anything dramatic happen in the browser. Until
now."
"A fantastic new improvement to Mozilla's JavaScript engine has landed.
Code-named TraceMonkey, this engine utilizes a technique, called trace trees,
which adds just-in-time native code compilation to SpiderMonkey," said John Resig, a Mozilla evangelist and
creator of jQuery JavaScript library.