Comparing Browser JavaScript Performance 134
Thwomp writes "Over at Coding Horror Jeff Atwood has an interesting writeup on JavaScript performance in the big four browsers. He used WebKit's newly announced SunSpider to produce the results. If a probable anomaly in the IE7 results is overlooked, Firefox 2 is the slowest of the bunch. Atwood has also benchmarked the latest Firefox Beta, and its performance seems to be improved significantly."
Opera (Score:3, Insightful)
client side javascript will become our enemy (Score:3, Insightful)
My basic rule of thumb has also been that client scripting should enhance and application but not be required for the application. In other words with JavaScript disabled the application might act rudimentary but will still produce results.
Re:Ooh ooh let me guess (Score:3, Insightful)
Re:client side javascript will become our enemy (Score:4, Insightful)
better idea (Score:2, Insightful)
Re:Hmmm (Score:5, Insightful)
To paraphrase: "What surprised me here is that Firefox is substantially slower than IE, once you manipulate the experimental data by removing something that IE is particularly slow at."
And guess what? If you remove string ops, bit ops, and date ops, then Firefox is probably faster than IE.
Re:Hmmm (Score:3, Insightful)
There could be a good reason for the test showing poor performance - say IE is shit at string concatenation - and then the result reflects badly on IE. Or, it could be that for whatever reason the benchmark hits some strange edge case that virtually never crops up in normal usage, in which case the benchmark should be thrown out. But without further information you have to just treat the result as null. It's an unknown.
Re:A grain of salt (Score:4, Insightful)
Re:Hmmm (Score:2, Insightful)
That being said, one can't be sure that IE7's string reading was 'anomalous' without significantly more data.
Also, I wouldn't make that much of the difference between Vista 32 and Vista 64 or between a 3.0 Ghz and a 3.2 ghz Core 2 Duo. Browser performance is likely extremely similar on both systems for all browsers, with the possible exception of IE7's (I have a sneaking feeling the 'anomalous' reading is an issue particular to 32-bit Vista)
Good one (Score:3, Insightful)
Had it been "the big one and the one that just edged into relevance", then most people would know what you meant.
Re:client side javascript will become our enemy (Score:3, Insightful)
That's exactly why CSS exists... to separate content from layout/display characteristics. You can make an entirely graphical-button image-chopped page with all kinds of rollover goodness, and as long as you write your (x)html and CSS properly, it will break down fine in a text or mobile browser. Using techniques like image replacement is critical if you want your flashy website to be accessible to people using screen-readers or mobile browsers.
This of course assumes that your site has some kind of content, other than just pure uncategorized imagery.
Otherwise you could just put all your images in a table, put no alt attributes in and who cares? Oh, only the 40 million blind people in the world, and anyone who would want to use your site from a mobile device. Ahh, but those people probably aren't in your "target market" are they?
Just a note: it wasn't "supposed" (Score:2, Insightful)
IE JScript string perf (Score:1, Insightful)
There was an article about IE's string performance in the Jscript team blog on MSDN a while back : http://blogs.msdn.com/jscript/archive/2007/10/17/performance-issues-with-string-concatenation-in-jscript.aspx [msdn.com]
Aaargh! on December 20, 2007 11:34 AM
Re:Bah humbug! (Score:5, Insightful)
Re:A grain of salt (Score:3, Insightful)
I'd like to see those results.
Re:A grain of salt (Score:5, Insightful)
I guess there's value in such a benchmark, but it goes against the conventional wisdom of Amdahl's Law. If JS execution accounts for only 10% of the runtime of your application, it will be of little value to make JS 20% faster. You must concentrate on the other 90%.
What I learned. (Score:2, Insightful)
Re:A grain of salt (Score:3, Insightful)