CNET también está disponible en español.

Ir a español

Don't show this again

Jeff Bezos climate change fund Qualcomm X60 5G modem SpaceX Starlink launch Looping space signal: Aliens? Galaxy Z Flip review The Batman first look

Mozilla juices Firefox's JavaScript with IonMonkey


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



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.