Australian Technology

Firefox 9 launches with type inferred JavaScript

Takeaway: The cries of Firefox being slow will be subdued with the release of an improved JavaScript engine for Mozilla’s browser.

Mozilla has officially announced the release of Firefox 9, although savvy users have been able to download Firefox 9 labelled builds since earlier this morning.

The big improvement in this release is that Firefox’s SpiderMonkey JavaScript engine now has type inference that allows the engine to conduct code analysis and monitoring of values during execution, which in turn allows the JaegerMonkey JIT compiler to generate more efficient code. The result is up to 30 per cent improvement in JavaScript execution times.


Credit: Mozilla

“Javascript is a dynamically typed language, and without knowing the types of values a JIT compiler needs to generate code that accounts for all the possible types of the involved values. This significantly slows down execution of the program in comparison with a statically typed language like Java. With TI integration into JaegerMonkey, we are closing a significant part of this performance gap” wrote Brian Hackett, Firefox engineer, in a blog post when type inference hit Firefox’s Beta channel.

Other improvements for developers include the ability to provide start and stop times for <audio> and <video> elements, support for chunking of AJAX requests which allows content display as it is downloaded, rather than waiting for a complete download, and allowing Firefox on Android users to take photos with their phone’s camera without leaving the browser for input elements used with type=”file” and accept=”image/*”.

A list of changes for developers can be found here.

Get IT Tips, news, and reviews delivered directly to your inbox by subscribing to TechRepublic’s free newsletters.

Chris Duckett

About Chris Duckett

Programmer and journalist Chris Duckett is the Editor for TechRepublic Australia.

Chris Duckett

Chris Duckett
Chris started his journalistic adventure in 2006 as the Editor of Builder AU after originally joining the company as a programmer. He left CBS Interactive in 2010 to follow his deep desire to study the snowdrifts and culinary delights of Canada and returned to CBS in 2011 as the Editor of TechRepublic Australia, determined to meld together his programming and journalistic tendencies once and for all.