X

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.

Stephen Shankland Former Principal Writer
Stephen Shankland worked at CNET from 1998 to 2024 and wrote about processors, digital photography, AI, quantum computing, computer science, materials science, supercomputers, drones, browsers, 3D printing, USB, and new computing technology in general. He has a soft spot in his heart for standards groups and I/O interfaces. His first big scoop was about radioactive cat poop.
Expertise Processors, semiconductors, web browsers, quantum computing, supercomputers, AI, 3D printing, drones, computer science, physics, programming, materials science, USB, UWB, Android, digital photography, science. Credentials
  • Shankland covered the tech industry for more than 25 years and was a science writer for five years before that. He has deep expertise in microprocessors, digital photography, computer hardware and software, internet standards, web technology, and more.
Stephen Shankland
2 min read
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

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.