Type Inference: More JavaScript speed in Firefox 9

Firefox: Nightly-, Aurora- und Beta-ChannelShortly before Christmas, on 20. December, the final version of Firefox 9 is coming. At the moment the successor of Firefox Release 8 is still in beta phase. However, the few changes in Firefox 9 are worth mentioning. Because the project type inference (TI), an improvement in the JavaScript engine SpiderMonkey, was integrated. This is the preliminary analysis of JavaScript code, which that the performance can be significantly increased. According to the blog post of Firefox developer Brian Hackett it is an improvement over the common Kraken and V8 benchmarks at about 30%.

Even in the test of Computerbild, the new release of Firefox has done much better than its predecessor. In Kraken Firefox 9 was 26% faster than Firefox 8 and the V8 test had a whopping increase of 34%. This improvement is mainly relevant for web pages that have a high proportion of JavaScript code. On a purely static websites without JavaScript Type Inference, however, has no effect.

But what is Type Inference? Well, JavaScript is actually a typeless language. Unlike Java, where each variable has a specific class type. In order that a JIT compiler like JaegerMonkey can work effectively, the type of a variable must be known. Type Inference analyzes the use of each variable and calculates the data type of a variable. Thus, the execution can then accelerate significantly.

, , , ,

  1. No comments yet.

You must be logged in to post a comment.

  1. No trackbacks yet.