Mac OS X Browsers: Javascript Performance Shootout
All major browsers except IE are available on Mac and all of them except Google Chrome are nearing the release of a new version. Since web applications are becoming increasingly javascript heavy (like gmail ), javascript performance is where the optimization effort of most vendors are being concentrated. So how do the browsers stack up ? Here are the benchmark results. (The X Axis is Time in milliseconds.)


Sunspider is the benchmark suite of webkit (Safari) and V8 is the benchmark suite created by Google Chrome developers. Expectedly Google Chrome kicks ass in the V8 benchmark but even in the Sunspider test, it narrowly edges out Safari. In the sunspider tests Firefox is two times slower than chrome and webkit and in the V8 tests the gap between Safari and Firefox is quite large. Tests were run with the “jit” option for content set to true which is what is recommended for optimal performance. What is shocking is the dismal performance of opera in both the benchmarks. Opera once prided themselves as the “fastest browser”. That is clearly no longer the case, at least when it comes to javascript performance. And as we are moving more and more in the direction of complex javascript heavy web applications, it will be Javascript performance that will matter.
Chrome and Safari are clearly the browsers to beat. What is surprising is that, with a relatively new javascript engine and a completely new architecture Google’s V8 has managed to beat the other javascript engines. Unlike other engines which turns javascript into bytecode, V8 converts it into machinecode. Google definitely wants Chrome to succeed. Among the google products I know of, it shed the beta tag the fastest and chrome has also been heavily advertised. Google defnitely wants browsers to become powerful enough to run web applications which are equivalent in functionality and speed of native desktop apps. So we can defnitely assume that Google is in it for the long term and has a strong interest and stake in making Chrome faster. So I’m making a bold prediction that in a year’s time, V8 will leave other JS engines in the dust :).
Update: What I have tried to do is take the version of the browser which is closest to a release version.In case of firefox, the nightly versions eventually become the release version. And in case of chrome for mac, the daily builds are the only ones available [dev channel is also forked from the daily build]. Since I’m not sure whether webkit changes will appear in Safari, I have chosen Safari Beta instead of Webkit. The Safari Beta is the latest beta offered y Apple (5528.17). If someone can confirm whether webkit changes will end up in Safari, I will be happy to include the webkit scores too.








Hi Manu,
as you were using the latest nightly of Chromium, I would suggest that you also use the latest nightly of WebKit in conjunction with the beta version of Safari 4.
Greetings
I agree with Patrick.
You should specifiy which version of Safari/ WebKit you used. If it’s the public Beta on Apple website from several months ago against a current nightly – the results might be off some.
I have updated the post with my reasoning as to why I chose Safari Beta instead of webkit nightly.
Hi Manu,
eventually the changes in WebKit will find its way into Safari but Apple seems to be very conservative in updating Safari (read: “merging WebKit’s changes into their version of the browser”), so I can understand your decision after reading your reasoning, as the current changes will likely not make it into Safari 4.
Greetings
Leave a comment