Home » Guides Advanced Article

Javascript Speed Tests

1.0/5.0 (1 votes total)
Rate:

Sean Patrick Kane
August 02, 2006


Sean Patrick Kane
This article originally appeared on http://celtickane.com, and is licensed under the Creative Commons Attribution - NonCommercial - ShareAlike 2.5 license.
Sean Patrick Kane has written 1 articles for JavaScriptSearch.
View all articles by Sean Patrick Kane...

Introduction

How does the speed of your browser compare with the speed of competing browsers? Instead of testing page load times, or the load time of the browser itself, I've decided to test the Javascript speed of three of the most popular browsers: Firefox, Internet Explorer, and Opera. How will your favorite browser compare?

Please keep in mind that any of the duration/time values listed here are completely relative. The only way to effectively compare speed values is to use the exact same machine, and with the same processes running in the background. It is nearly impossible to test non-Windows operating systems in this manner because you would introduce too many new variables (operating system, total CPU load, etc.) -- for this reason, I have not tested Safari.

If you'd like to try this test out for yourself, the table below is the exact test I've used for the experiment. I ran each test fifteen times, graphed the set of fifteen points, and took the overall average. You are more than welcome to examine the Javascript code to see what each test is actually doing.

Test Description     Duration (ms)
Try/Catch with errors
Layer movement
Random number engine
Math engine
DOM speed
Array functions
String functions
Ajax declaration
Total Duration
0
ms

 

 

The Results

How did each browser perform? Before I explain the results, I'd first like to say that I use Firefox religiously, and I am very addicted to the extensions. With that said, I was expecting Firefox to be ranked at the top, or perhaps even second place. Below is a graph of the fifteen tests that I performed -- for any Firefox lovers, you may want to cover your eyes.

 

 

Browser Average Time (ms)
Firefox 1.5 1974
Internet Explorer 6 (SP2) 1622
Firefox 1.5 (Safe mode) 1752
Opera 9.0 442

 

Conclusion 

Well, the conclusion is quite clear: Opera beat the shit out of everything else. It's more than 3.5 times faster than all of the other competing browsers. Your mileage may vary based on your machine and version of browser. Although the conditions of the test are not typical of the average webpage, there are webpages, like Digg, that are extremely Javascript-intensive, and the difference in Javascript speeds would be very noticeable. Perhaps a test like this will convince someone to switch to Opera for performance reasons. I cannot explain why Opera's Javascript is so much quicker than the other two browsers -- perhaps someone would like to contact me with an answer. For now, I believe I'll still stick to my Firefox because of its extensions and interface -- but this test will certainly give me reason to look further into converting to Opera.

 


Add commentAdd comment (Comments: 0)  

Advertisement

Partners

Related Resources

Other Resources

arrow