37 JavaScript benchmarks
JavaScript benchmarks have achieved greater visibility in the Ajax era, but they have a long and proud history. I did a little digging and came up with this round-up of profiling suites past, present and future. Many of them mix pure JS tests with DOM tests. Those that focus more on a specific type of operation are broken out into a separate list after the jump, as are browser-specific benchmarks and a bunch of cobweb-covered older suites.
Recent Benchmarks
- SunSpider 0.9: The Webkit team's JavaScript benchmark. (Announcement here.) (Jeff Atwood's post here.)
- Javascript Library Performance Test Roundup: From the folks behind PBWiki. (Results page here.)
- Ajax and Flex Data Loading Benchmarks: From James Ward, RIA Cowboy using his own Census tool.
- JavaScript Engine Speeds: John Resig of jQuery's September 2007 post comparing Rhino to SpiderMonkey, Tamarin and JavaScriptCore.
- A Study of Ajax Performance Issues: Coach Wei uses the jsLex profiling tool to put the entire Ajax stack through its paces.
- Evaluate Low Level JavaScript Performance Characteristics: Speaking of jsLex, it was created by the folks from RockStarApps, who pitted it against September 2007's best and brightest browsers in this post.
- JavaScript Speed Tests: From Celtic Kane Online.
- General Browser Load-Time Test: The first in an entire suite of browser tests from the Non-Troppo site.
- Double-Dollar Speed Test: An interactive suite that tests the selector functions of various big Ajax libraries.
- Computer Language Benchmarks Game: A clever, snarky "game" in which various language implementations can be tested against one another.
- i-Bench: The now-discontinued benchmark suite used by PC Magazine can still be downloaded in its archival edition.


Beyond becoming multi-threaded, AJAX is beginning to open up the web to new types of applications, ones that are document centric (word processors, modeling tools, etc.) rather than data and transaction centric, i.e. all those rectangular CRUD applications that make up 99.9% of webapps. It also means that the sorts and types of rich client interactions are going to dwarf the traffic that we see today.
That means 1. abandoning the forms-and-reports way of writing webapps (which will break when you try to write something like rational rose as a webapp) and moving to the component GUI model (like Swing, Winforms, etc.) and 2. being very clever about the frequency and size of your XHR conversations with the server. From my unscientific tests (Yahoo mail and Google calendar) it seems that some are winning and some are losing the battle on fat XHR. I don’t think any amount of JSON or compressed XML magic will solve the problem of poor design.
I think the right way to achieve all of this is by moving AJAX/Webapp development to component GUI application frameworks. Properly done, they have the potential to hide all of the messy bits like exposing too much of your business logic on the client side, optimizing XHR requests for components that have empty server-side event listeners, reducing the impedence mismatch between the Javascript/CSS/XHTML world and the business logic.
Those who don’t move in this direction will be stuck building and maintaining ever more complex applications because they didn’t make the shift to a new design. It’s time to think of the browser simply as a display server.