Is Safari Really That Fast? The Results
About 3 min reading time
This post was migrated from my previous blog managed by an old CMS. Some parts may be broken or poorly formatted, images may be missing, etc. Feel free to report an issue.
To benchmark the three browsers, I decided to run a range of tests: Sunspider, Kraken, Octane, Peacekeeper and Minesweeper. To help normalize everything a bit, I ran each test in each browser 3 times and averaged the results. Between tests, I cleared the browser's cache and cookies, and restarted the browser to ensure each run was "fresh". I ran the tests on my 2012 MacBook Air with a 1.8Ghz core i5, 8GB of RAM, running OSX Yosemite. My method is not the most scientific, but it's enough to get a sense of what "normal" people may experience.
The short of it is, no, not really. To be fair, I don't think Apple lied. If anything they probably benchmarked Safari against old versions of Firefox and Chrome, or created their own benchmark and found specific edge cases where Safari performs better. But without more information on how they went about testing it, I'm merely speculating. I ran my own tests, and as I expected Safari is about as fast as Firefox and Chrome.
Look at these pretty charts:
Unsurprisingly, Firefox performed best in Kraken and Chrome performed best in Octane, they're made by Mozilla and Google respectively. Sunspider isn't the most relevant benchmark these days, but when it comes to testing the core of the language, it's something. Chrome was surprisingly slow here, but I imagine Google is more worried about optimizing for more complex algorithms than the small pieces. The Minesweeper benchmark was run using the "Island" pattern on a "huge" size board, and Safari being the fastest is at least showing that Safari is pretty quick, even if it gets crushed in the other benchmarks.
I will say, however, that Safari does feel faster than Chrome from time to time. A simple test of scrolling quickly through my news feed on Facebook reveals a fair amount. In Chrome, the page stutters a bit as I go. In Safari, it's far less so. These are the kinds of differences users notice in the end, and I'm not sure this is something benchmarks will accurately capture. So while I don't think Safari is actually 6x faster than the others, I will say that Apple isn't wrong: it's a speedy browser.
Still, some more information on how they arrived at that chart they loved showing off would be nice. If anyone knows, I'm definitely interested.