Mozilla Developers Leverage Apple WebKit Code to Build New Javascript Engine

Tuesday Mar 9th 2010 by Developer.com Staff
Share:

Mozilla developers hope JagerMonkey will propel Firefox to the front of the browser pack in Javascript performance.

Firefox's new Javascript engine is called JagerMonkey. It's not done yet, but when it is, it's going to be faster than TraceMonkey - thanks to Apple's open-source Nitro Javascript code.

In a lengthy blog post explaining JagerMonkey, Mozilla's David Mandelin said, "We decided to import the assembler from Apple's open-source Nitro JavaScript JIT. (Thanks, WebKit devs!) We know it's simple and fast from looking at it before (I did measurements that showed it was very fast at compiling regular expressions), it's open-source, and it's well-designed C++, so it was a great fit."

The problem with Mozilla's TraceMonkey tracing JIT is that it works really well when it can fire up it's boosters but when it can't, it's slow.

"For example," Mandelin explains, "it is 9x faster than the interpreter on SunSpider's math-cordic benchmark. But it can't really trace a benchmark like date-format-tofte, which calls eval in its main loop, so tracing only yields a 5% speedup on that program."

It appears that JagerMonkey will take what works with TraceMonkey and mash it together with Apple's Nitro JIT to put Firefox back to the front of the pack in Javascript performance. According to Ars Technica's Ryan Paul, "Firefox now lags behind Safari, Chrome, and Opera in common JavaScript benchmarks."

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved