Upcoming Browser JavaScript Engine Benchmarks

I've seen lots of people recently saying that Firefox's TraceMonkey JavaScript engine blows Google's V8 out of the water...but was a little skeptical so I decided to do some benchmarks of my own. Now with any benchmark, everything here needs to be taken with a grain of salt as performance will certainly vary upon which sites you are viewing. For this test I have used WebKit's SunSpider. Also, since Chrome and Safari do not have native ports available on Linux right now, I had to do the test under Windows XP. The test machine is dual-core so multi-process/threaded apps should show a benefit, but I feel it's totally fair as single-core machines are quickly going the way of the dinosaur and do not accurately represent the future, which is what we're talking about here. Also as Chrome does not have a stable/final release yet, I've compared with many other browsers' development builds.

So let's get to some numbers. On my test machine Chrome completes the SunSpider test with a total time of 2423ms; pretty nice! Ok, now what about Firefox? The current release, 3.0.3 takes 4244ms. Well, what about the new beta for 3.1 that just came out? It scores at 3823ms. So, wait...that's not too terribly much faster than 3.0. Do we have TraceMonkey enabled? Nope. I don't know why, but the default build of FF3.1.beta1 comes with TraceMonkey disabled by default, so after enabling it the results jump down to 1654ms. Wow! That really is faster than Chrome. Ok, so how about "minefield" AKA the nightly trunk build of Firefox (FF-3.1.b2pre-20081023): 1567ms! So yes, yes indeed Firefox 3.1 and the TraceMonkey JavaScript engine are indeed faster than Chrome and it's V8 engine.

So what about the other guys? Well, first off let's try Safari which shares it's webkit rendering engine with Chrome. The current release, 3.1.2 scores at 4894ms. So how about the development build? With webkit-r37604 (and Safari/WebKit's new SquirrelFish JavaScript engine): it goes to 1664ms. That's faster than Chrome/V8 too, but not quite as fast as FF/TM.

Opera's latest release is 9.6, and I didn't manage to find a development build available for it's next version...probably because it's still proprietary unlike the open source competitors we've discussed so far. Opera scores 5979ms which is slower than both Safari and Firefox's current stable releases, but it's still much better off than Internet Explorer. Internet Explorer 7 scores an abysmal 90522ms. That makes it almost 58 times slower than Minefield. Microsoft, that's absolutely pathetic. I didn't get a chance to try out IE8, but from what I understand it's not much better off in the JavaScript department. See update below...

Here's a chart I threw together in OpenOffice of the results. I omitted IE7 because it was such a huge difference that it made it hard to tell the difference between all the others.


Lastly, just for fun I tested my iPhone and Mobile Safari (running firmware 2.0.2), it took 136081ms. But hey, for a device running an ARM @ 412Mhz with 128MB of RAM vs. a full fledged computer with a dual core processor, and a gig of ram...that's still got to be better than Internet Explorer 7 did. I wish I had a Windows Mobile device to test, and a Android/G1 too, but oh well.

So, yes, with TraceMonkey enabled...Firefox reclaims its place as the fastest browser, but Safari and Chrome certainly aren't too far behind either. With this extreme increase in JavaScript performance on it's way...maybe it's time to finally retire the old "web 2.0" buzzphrase and move onto Web 2.1

Seems I owe Microsoft an apology for not benchmarking IE8 before. They really have made some progress. The following numbers can not be fairly compared with the above because it was ran inside a virtual machine with only access to a single core and half the RAM, but here they are. IE8-beta2 scored at 9542ms. But, for reference, in the same virtual environment Firefox "Minefield" was still able to pull off 1873ms. So, as while still no where near as fast as the other guys, IE8 is lightyears ahead of IE7 in its javascript performance.