JavaScript Speed Test

I started out to test out the speeds of JavaScript engines in the browsers. I was keen to experiment on the Chrome’s high performance V8 JavaScript engine. I designed this very rudimentary experiment to compare two JS engines (the one in Firefox and the one in Chrome). IE didn’t really support the DOM and the experiment didn’t work out, and I was not keen to make the whole thing work on IE. I am not an IE person.

The experiment is a page that has a math intensive JavaScript program that will compare the starting and ending time in machine timecode and publish the difference on page. The JS script is designed to do Sine, Cosine operations and store the values and then print them on the page. The page also has some CSS elements.

The page can be downloaded.

The results I got on my Core i3 laptop with 3 Gigs of RAM running Windows 7 Home Basic…

On Firefox (click to enlarge),

On Google Chrome,

And on IE where the script didn’t work,

The V8 engine that powers node.js I thought would be a lot faster. Google claims the power of V8 lies on it’s garbage collection system. I didn’t look into garbage collection though. But the speed, as you can see is slower than Firefox.

I didn’t test it on Safari, Opera etc. If anyone compares them, please let me.