Sunday, June 15, 2008

Compared Firefox, Internet Explorer, Opera 9.5, and Safari for speed, memory usage, script loading and startup time

Speed Testing the Latest Web Browsers


Read the hype on every new web browser released or due out this year, and you'll see claims that every one of them is "faster" than all the others. You could compare super-specific tests and decipher all the code-brain terminology, and you'd still be left wondering which browser starts quicker, uses less memory, and slides through dynamic interfaces like Gmail the fastest. Since our squadron of independent analysts had the week off, we ran the latest editions of Firefox, Internet Explorer, Opera 9.5, and Safari for Windows through some unscientific but highly geeky tests ourselves on a plain old Windows computer. Take a look at the full (and somewhat unexpected) results after the jump.

The testing system

For the sake of rating all four of the latest new-and-improved browsers in the same environment, I tested the most current releases of Internet Explorer 7, Opera 9.5, Safari for Windows 3.1.1, and the third Release Candidate of Firefox 3 (which is pretty darned close to the final version dropping Tuesday) on my Windows Vista laptop. Each browser was installed completely fresh, and, in the case of Internet Explorer 7, re-set to its new-install settings.


Here are the specs of my test system, for comparisons and curiosity:

  • OS: Windows Vista Home Premium (32-bit)
  • Processor: 2 GHz Intel Core 2 Duo processor
  • Memory: 2 GB
finger_trigger_cropped.jpgI looked far and wide for free, easy-to-grasp benchmarking software that could cover all four of the browsers I wanted to test, which covered every major aspect, and came up short. Instead, I tested the browsers the way most people experience them—click, wait, then watch each page load. Using Rob Keir's simple but millisecond-accurate timer, I launched every action with a dual tap of the enter and "\" keys (pictured at right) to set the timer, then tapped the "\" key again when what I wanted to load had arrived. I re-ran tests when I thought I'd been slow, and each score below is an average of three or more trials.


Scientific and precise? Heck no. Easy to understand and free from selective prejudice? Very much so. I did use two tests assembled by inquisitive programmers for the more technical stuff, and noted that below. Now, onto the results!


Test 1: Startup time—Winner: Opera!

Taking a page from Mark Wilton-Jones' oft-linked tests, I timed each browser loading "cold" (straight off a re-start, not having run already) and "warm" (having run at least once that session). Vista can be very fickle at boot-up (at least on my system) and slow things down considerably, so I used each browsers' best times from launching to loading a locally-saved Google home page (which both cuts out network variations and explains the speedier boot times):


A pleasant surprise that Firefox 3 boots faster than 2 (from deep-seated memory, at least), as well as how quick Opera moves in general, at least compared to Safari in this test.


Next, I opened each browser two times and headed to a random bookmark to jog it a little. Here's their speeds at their next "warm" boot-up:



Surprisingly consistent—note that Firefox's seeming lapse is less than 0.2 seconds, which could certainly fall under margin of error.


bookmark_list.jpgNow for the real test. I placed a folder of eight links—from the super-clean Google homepage to the image and Flash-heavy Gizmodo and YouTube sites, and a few familiar stops in-between—in each browser, ran to the Lifehacker page and back to "warm" it up, then timed each browser's version of "open all in tabs" from first click until the last little circle stopped spinning. Opera, unfortunately, uses a more subtle coloration change to indicate load speed, so I had to rely on the status bar as well. The results:



You probably won't cry over a two-second delay when loading eight tabs, but Safari and Opera were surprisingly swift at multi-tasking in general (and we'll see why later).


Test 2: JavaScript & CSS—Winner: Safari!

JavaScript loading times get a lot of attention from folks like, say, Steve Jobs these days. That's because with the increasing prominence of AJAX interfaces on sites like Gmail, Twitter, and other webapps, a browser's ability to perform multiple quick computations can be far more important than a nanosecond advantage at text and table rendering.


You'll never get every browser team agreeing on what's a fair JavaScript test, as each platform has its own quirks and rules of working with it. Sean Patrick Kane's JavaScript speed tests has pulled attention from all over, however, not least because he's worked to make it more fair to all comers.


Here's the stats from Sean's test (in miliseconds):



I also tested each browser's ability to render Cascading Style Sheets, the design templates of a page, using nontropp's downloadable form:



I'm thinking Safari's big lead in CSS rendering is how it creates that everything-snaps-at-once feel when loading pages. And, for a browser that somewhat auto-loads with my OS, Internet Explorer has yet to bring a worthwhile statistic to the table.


At this point, you might certainly wondering just where Firefox 3's vaunted speed/performance/stability improvements might actually, you know, matter. Follow along, then, to the other side of speed.


Test 3: Memory use—Winner: Firefox 3!

Unless you're rocking a workstation with more memory than you can spare, browsers shouldn't be using all your RAM and slowing other apps to a trickle. Firefox 2 was notorious for bloating far beyond its fighting weight after steady use, but developers' hard work seems to have paid off, at least by my tests:



The blue portion is each browsers' memory use when first started, and the red extensions their size (according to Windows Task Manager) with those same eight tabs above opened. Again, few people will have eight tabs open, but I scaled it to see where the differences lie. I wanted to double-check Firefox's night-and-day improvement, so I closed and launched it again. This time, it was using 117MB—not a slim amount, but a still marked improvement over its peers. Of course, if you do have memory to spare, both Safari and Opera, as seen higher up, can put it to quick-footed use.


Conclusions

Let's re-emphasize that this was far from a scientific study, and your mileage will certainly vary on different systems. With Opera and Firefox especially, running a like-new version is somewhat of a cheat—almost any enthusiast is going to have a must-have extensions, features, and add-ons running, which throw off the speed and memory scales. Still, it was gratifying to actually sit down and measure all the major browser options on a human level, just a timer, a spreadsheet, and a few cups of nerve-boosting coffee. Thanks to x40sw0n for inspiring this post!


What's your take on the battle for browser speed? What essential tricks and tips have you used to whip your web software into shape? Let's hear your takes on all this data in the comments.


Kevin Purdy, associate editor at Lifehacker, feels like he just got home from a seriously nerdy five-way date. His weekly feature, Open Sourcery, appears every Friday on Lifehacker.


ref: http://lifehacker.com

No comments: