Firefox 9 with fancy JavaScript optimizations



Firefox 9 slinks onto the scene with fancy JavaScript optimizations
Another six weeks have gone by, and another version of Firefox has been released. Still not officially "live," Firefox 9 improves on Firefox 8 with a JavaScript engine that's up to 30 percent faster and, well, not a whole lot else. Mac OS X users will have a little more to gain, as Firefox 9 also includes two-finger gestures for backward and forward navigation on that platform.
The new version includes a number of bug fixes to improve stability and security, better support for HTML5, CSS, and MathML, and some improvements to its Do Not Track feature to allow scripts to know if tracking is enabled or not. All told, the new release includes more than one thousand bug fixes and improvements.

But if Firefox users will notice anything new in Firefox 9, it's the JavaScript engine. The updated engine is potentially a big win for Firefox. Common JavaScript benchmarks have shown performance improvements of around 30 percent, and a paper about the new technology claims that real Web sites can see performance gains of 50 percent.
The new JavaScript technology in question is called type inference. JavaScript is a dynamic language—a variable in JavaScript could be a number, or a string, or an array, or a function, or even change from one thing to another. This makes writing scripts forgiving, but makes it much harder for JavaScript engines to generate high-performance x86 code. When adding two variables, the engine has to consider all the different possibilities.
With type inference, Firefox's JavaScript engine can, in many situations, figure out what type a variable is. In turn, this allows the generated code to be faster and more specific; it no longer has to consider all the different possibilities.Google's Dart tries to tackle the same problem, but requires a whole new language to do so.
Courtesy | 
Related Posts Plugin for WordPress, Blogger...