Cross-browser Javascript Engine Speed Comparison

Having done the fluid simulation, I’m in a place where I can make a quick observation about the relative speed of Javascript + Canvas on a variety of browsers.

V8 in Google Chrome both on Windows and Mac is truly unbelievable. The simulation runs faster in Javascript there than it does on the iPhone 4s. It’s very close to the kinds of speeds I saw with the simulation written in C++ for OpenGL on hardware of about 5 years ago.

Tied for next place are Safari 5 and Firefox 7. They’re still quite fast, but get only about half the frame-rate of Chrome. (About the same as FireWater on the iPhone 3.) Safari glitches every few seconds too, as though it’s garbage-collecting all at once or something. Firefox seems to perform about the same on Mac and Windows. Firefox also has a nasty habit of eventually ramping my processor usage up to 97% and sticking there. That seems unnecessary.

Last is IE9. IE9 is the first MS browser to support Canvas, so I can’t compare it to anything older. But no need. It’s pretty slow–about half the speed of Safari.

The take-home is that whatever Google is doing, they should keep doing. And everybody else should look at what Google is doing and copy it. Because it’s better than what they’re doing.

Leave a Reply

Your email address will not be published. Required fields are marked *