Blog Post

JavaScript 3-10x Faster On iPhone OS 3.0

Stay on Top of Enterprise Technology Trends

Get updates impacting your industry from our GigaOm Research Community
Join the Community!


There has been a reasonable amount of speculation surrounding JavaScript speed improvements in iPhone 3.0. Testing carried out on the iPhone Simulator bundled with the SDK didn’t lead to a conclusive outcome, but benchmarking done by Wayne Pan would seem to suggest that iPhone 3.0 handles JavaScript 3x-10x faster than iPhone 2.1.

Last year the WebKit development team released information about a new JavaScript engine, slated to have a dramatic improvement in performance. Originally dubbed SquirrelFish (now called ‘Nitro’), to date it has not been included in any major release of the iPhone OS. Expectations are that the performance enhancements found in iPhone 3.0 are due to the inclusion of the SquirrelFish engine, leading to faster web site browsing and snappier web app performance.

The new Nitro engine has gradually been improved by the WebKit team over the past year, and is included in the latest Safari 4 Beta. This new engine accounts for the dramatic performance improvement in Safari 4, which Apple (s appl) states as enhancing both JavaScript and HTML rendering:

Using the new Nitro Engine, for example, Safari executes JavaScript up to 30 times faster than Internet Explorer 7 and more than 3 times faster than Firefox 3 based on performance in leading industry benchmark tests: iBench and SunSpider.

In addition to superior JavaScript performance, Safari offers top-flight HTML performance — the best on any platform — loading pages 3 times faster than Internet Explorer 7 and almost 3 times faster than Firefox 3.

While Nitro is certainly responsible for the improved JavaScript performance, better HTML loading times may be due to other browser enhancements. Hopefully these will also make the move to Mobile Safari, increasing performance and page loading speed. This is even more important on a mobile device, where connection speed is far more limited than on most desktop machines.

Moving this new engine across to Mobile Safari on the iPhone is indeed the next logical step, and the 3.0 release of Apple’s iPhone operating system would seem a reasonable point at which to integrate it. John Gruber created a simple script to test whether a browser is likely to be running the Nitro engine — this tests positive in Safari 4, and he confirmed yesterday that the test is also passed on the iPhone 3.0.

All these pieces of an ongoing puzzle would seem to lead to a fairly strong conclusion that Mobile Safari on iPhone 3.0 will receive a completely new JavaScript engine, significant speed improvements, and better web application performance. I’m thoroughly looking forward to experiencing the same speed boost on my iPhone that Safari 4 brought to my desktop, and can’t wait to try out the new software.

18 Responses to “JavaScript 3-10x Faster On iPhone OS 3.0”

  1. I am aware that they weren’t shipping products, but Safari’s beta isn’t a shipping product, either, so what does that matter? IE8 is now out, and Firefox 3.5 is in late beta. Why is Apple comparing their beta browser to old releases of other browsers that are known to be improving Javascript speed? These artificially inflated numbers are worthless.

  2. Eevee — neither IE8 nor Firefox 3.5 were shipping products at the time of the Safari beta release. If they want to compare performance to browsers that most users are actually using, those would be IE7 and Firefox 3.0.x.

    Apple blog people — “This is even more important on a mobile device, where connection speed is far more limited than on most desktop machines.” This sentence makes no sense — the speed of the rendering engine has nothing to do with the connection speed. If a page is 300k, it takes the same time to download no matter what. The rendering engine just speeds up what happens after the connection has delivered all the content.

  3. Safari 4 beta was initially touted and labeled as the fastest browser on the planet earth. But I have observed that in addition to JavaScript rendering there are many issues which decides stability of a browser. Google Chrome has been gaining ground in popularities probably at the cost of IE & Firefox.