Well, what browser is really fastest?
Internet Explorer vs. Firefox vs. Safari vs. Opera
According to the February 2008 trends in Browser Statistics, that is the order of the web browsers in terms of their popularity, or at least, in terms of their market share.
IE 54.4% (IE6=30.7, IE7=22.0, IE5=1.7), Fx 36.5%, Safari 2.0%, and Opera 1.4% (may be ignoring mobile phones?).
And according to Thecounter.com and Wikipedia the popularity in Q4 2007 is
81.14% for Internet Explorer, 13.81% for Mozilla/Netscape, 3.21% for Safari, and 0.67% for Opera.
So let us evaluate these browsers on the the fastest known MD5 implementation and see how they perform in reality.
The test we are going to perform uses code that is unmodified since earlier than at least some time in 2003:
MD5 script behind the test
As you probably know, the claim that my implementation of the MD5 algorithm in md5.js is the fastest is supported by the original benchmark page, which I have updated from time to time with the results from new browsers. It has been defeated a few times in individual tests by MD5_hexhash by Masanao Izumo. I think that he wrote a great script, but in fact, it is inferior to mine by far, except on a few odd browsers like Netscape Communicator 4.77 / Mac OS 9.2.2 or Opera 6.02 / Mac OS 10.2.6 (on which the checksum failed for Masanao Izumo's script). Yet I consider his script to be my only competitor, as the popular script by Paul Johnston is confusing to use and always significantly slower.
I hold my script to such a high standard that any time any script achieved a higher score than my script's lowest score, I reported that my script had been beaten. The only script which could ever beat it, even once, with all the iterations I tried, was the script by M.I. However, in some situations his MD5 checksum fails, rendering his algorithm useless. Although it was defeated in a single individual test on Opera 7.50 (Mac OS 10.2.8), it has stood the test of time ever since being first written, and has never been beaten in a complete experiment.
The 1K = 1024 B test!
Each browser will be exposed to a test which compute the MD5 digest for a string with approximately 1024 bytes. The goal is to have the browser tested for about two seconds. A longer period of time might result in a "Slow Script" warning which would completely invalidate the speed test results.
We will continue performing the same computation repeatedly, and terminate the iteration when about two seconds has passed. (On old computers perhaps not even one iteration can be finished in two seconds.)
The correct md5 value should be babc2d5c5c0ac1f4a7aee225f1bcb00a
After giving you the average speed in bytes/second, the speed test will also give you the individual results of each iteration. You can tell whether your browser has a little bit of trouble by seeing the values in the individual results are uniformly distributed or erratic. Also, some browsers may be slower at the beginning or the end of the iteration because they are still processing some other activities going on in the web page, like rendering the page at the beginning, etc.
The tests will be done on the same computer as each other, with each browser running alone and all other applications closed.
Let's assign a score of 100% to Internet Explorer. Then the scores are:
|Internet Explorer 6.0||100%|
Clearly the winner is Safari 3.1 with almost double the performance of all other browsers, more than double of both Firefox and Internet Explorer.
Update: 3-26-08. We have repeated the tests to see how browsers fare on a Core 2 Duo computer rather than a Pentium 4. Also, we have tested two new beta browsers.
|Internet Explorer 7.0||57834 bytes/second = 100%|
|Firefox 2.0.12||118503 = 205%|
|Safari 3.1||221697 = 383%|
|Opera 9.26||100926 = 175%|
|Opera (3-18-08)||241542 = 418%|
|Firefox 3.0b4||298093 = 515%|