NewsMozilla Developers Leverage Apple WebKit Code to Build New Javascript Engine

Mozilla Developers Leverage Apple WebKit Code to Build New Javascript Engine

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.”

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories