iPhone 14 Wish List 'House of the Dragon' Review Xbox Game Pass Ultimate Review Car Covers Clean Your AirPods 'The Rehearsal' on HBO Best Smart TV Capri Sun Recall
Want CNET to notify you of price drops and the latest stories?
No, thank you

Mozilla juices Firefox's JavaScript with IonMonkey

Trying to keep competitive when running Web-based software, Mozilla is working to speed up its engine for running JavaScript software. Expect it in early 2013.

Mozilla says the new IonMonkey technology coming in Firefox 18 will significantly improve JavaScript performance.
Mozilla says the new IonMonkey technology coming in Firefox 18 will significantly improve JavaScript performance.

Mozilla has begun building a new technology called IonMonkey into Firefox to improve its JavaScript performance.

High JavaScript performance is essential in today's hotly competitive browser market, because JavaScript is the language behind complicated Web sites and Web apps such as Google Docs and Facebook. IonMonkey has now been packaged into the "nightly" version of Firefox 18 for hardcore developers; that version is scheduled to become the mainstream version of the browser early in 2013.

IonMonkey is what's called a just-in-time compiler, or JIT for short. In olden days, JavaScript would run line by line in the browser, but JITs speed it up by converting a JavaScript program into a program that runs natively on a computer processor the way ordinary software does. That process, called compiling a program, can mean a big speed boost.

Mozilla hopes for such a boost with IonMonkey, which will succeed earlier JITs called JaegerMonkey and TraceMonkey. Speed tests comparing it to the current Firefox 15 show IonMonkey improves JavaScript performance by 26 percent on Mozilla's Kraken benchmark and 20 percent on Google's V8 benchmark (which, by the way, Google is trying to replace with a broader test called Octane).

"IonMonkey is a huge step forward for our JavaScript performance and our compiler architecture," said Mozilla programmer David Anderson in a blog post today.

IonMonkey adds a new step to just-in-time compilation. Mozilla's earlier JITs compiled a binary straight from the JavaScript. But IonMonkey -- like Java -- translates the JavaScript code first to an intermediate representation (IR) that can be optimized better before the ultimate binary is produced.

Firefox logo

JITs have dramatically improved JavaScript performance, but there's a significant caveat: they're not allowed on Microsoft's forthcoming Windows RT, except with Microsoft's own Internet Explorer 10. IE10 is permitted to use the operating system's low-level Win32 interfaces, which enable JITs, but other browsers may only use the new WinRT interface, which effectively bars JITs. Mozilla and Google have strenuously objected to this browser constraint, which Microsoft lifted for Windows 8. Windows RT runs on mobile machines with ARM processors, whereas Windows 8 uses x86 chips traditional to the PC market.

Apple's iOS bars third-party browser engines altogether, but Google's Android is more open. IonMonkey is scheduled to arrive on Firefox for Android devices "soon," Anderson said.