Rounding Error

A few months ago, I ran some performance comparisons of various JavaScript selector engines using Slickspeed. My intent was to validate claims made by the ExtJS team as to why they didn’t use the Sizzle selector engine in Ext Core.

Ext Core has now gone final, so I wanted to re-run my tests. But there was also some news on the browser front: Apple released Safari 4 and Google dropped Chrome 2. Being the geek I am, I had to try them out. My Slickspeed test was the perfect candidate for seeing what Safari 4 and Chrome 2 could do.

In my prior post, I said developers should be bowing at the throne of Google for Chrome and its pack-leading JavaScript performance. That crown has now been abdicated. Safari 4 and Chrome 2 are leaps and bounds ahead of everything else on Slickspeed.

Here are the details on Safari 4:

  • Prototype: – 9ms
  • Dojo: – 3ms
  • JQuery: – 4ms
  • ExtCore: – 19ms
  • Sizzle: – 2ms


Safari 4 didn’t get along well with SnagIt, so I was only able to capture the bottom of the results output. Here are the results for Chrome 2:

  • Prototype: – 13ms
  • Dojo: – 4ms
  • JQuery: – 2ms
  • ExtCore: – 41ms
  • Sizzle: – 1ms


This is simply stupendous. The performance of JQuery turns into a rounding error in both these browsers. As a basis of comparison, here are the prior results for Chrome 1:

  • Prototype: – 13ms
  • Dojo: – 7ms
  • JQuery: – 8ms
  • ExtCore: – 13ms
  • Sizzle: – 8ms

So what conclusions can we draw?

  1. Choice of JavaScript engine becomes irrelevant with any of these two WebKit based browsers. They all fly, even lowly Prototype.
  2. Ext, LLC, screwed the pooch in not using Sizzle for the selector engine in ExtCore. It would have been a better investment in them adopting Sizzle and working to improve it rather than blazing their own trail. The difference in Chrome 2 between Sizzle and ExtCore is staggering: 1ms in Sizzle vs 41ms for ExtCore.
  3. The latest and greatest from Microsoft (IE8) starts to look absolutely pathetic compared to the competition. Microsoft should be ashamed of themselves for having their asses so soundly handed to them on such a critical piece of infrastructure as the browser. Whether it is due to their outdated opinions on open source, or that they can no longer attract top talent, Microsoft is proving to not even be a contender in the JavaScript performance race.
  4. Both Apple and Google use WebKit as the basis for their mobile offerings (iPhone and Android). The sheer power of WebKit is going to offer both these platforms outstanding opportunities for rich browser-based applications. It is clear why neither platform cares much about Flash or Silverlight: the don’t need them.

One thought on “Rounding Error”

  1. I’m confused by your statement that “2.Ext, LLC, screwed the pooch in not using Sizzle for the selector engine” when it appears to be a rounding error that makes up most of the difference throughout the tests.

    So if jQuery executes a particular selection in 0.49ms and Ext Core does it in 0.51ms, then its Ext Core that is dubbed immensely slower?

    Tests like this take no real world scenarios into account, so im not a big fan of these kinds of things.

Leave a Reply

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