File Under: Browsers

Firefox’s New ‘IonMonkey’ Speeds Up JavaScript

Photo: Jim Merithew/Wired

Firefox will soon be getting another JavaScript speed boost thanks to a project Mozilla calls “IonMonkey.” The project is a new just-in-time (JIT) compiler for Firefox’s SpiderMonkey JavaScript engine and will significantly speed up JavaScript-intensive websites like Gmail or Facebook.

IonMonkey is available today as part of the Firefox nightly channel and is slated to arrive in final form with Firefox 18 in early 2013.

Mozilla’s David Anderson writes about what makes IonMonkey faster on the Mozilla JavaScript blog:

SpiderMonkey has a storied history of just-in-time compilers. Throughout all of them, however, we’ve been missing a key component you’d find in typical production compilers, like for Java or C++. The old TraceMonkey, and newer JägerMonkey, both had a fairly direct translation from JavaScript to machine code. There was no middle step. There was no way for the compilers to take a step back, look at the translation results, and optimize them further.

IonMonkey takes that step back, introducing an intermediate step where JavaScript is optimized before it gets converted to machine code. The result is a pretty significant speed boost — Firefox 18 with IonMonkey is 20 percent faster on Google’s V8 benchmark tests than the current stable release, Firefox 15. For more details on how IonMonkey works and some additional performance stats, head over to Anderson’s post on the Mozilla JavaScript blog.

If the nightly builds are a bit too bleeding-edge for you, Firefox 18 and IonMonkey will hit the Aurora channel Oct. 8 and then Beta Nov. 20 before the final release in 2013.