There is a similar test for common tasks.
Every framework runs in its own iframe, thus no conflicts can happen. Tests are run selector by selector, with an interval to prevent the browser from freezing.
Tests are run in a neutral environment, no library or framework is included in the main javascript test, to avoid favoritism.
Note: This is a modified version of the SlickSpeed test page*.
Note: Browsers with buggy XPath pseudo-selector implementations (e.g. Safari 3) are prevented from using XPath for all tests. This results in a significant decrease in performance.
| selectors | NWMatcher 1.2.1** | Prototype 1.6.0.2† | Prototype 1.6.1.0**† | JQuery 1.2.6† | JQuery 1.3.2**† | JQuery 1.4.0**† | YUI 2.7.0† | YUI 3.0**† | Dojo 1.3.2**† | Dojo 1.4.0**† | My Library 1.0 | My Library 1.0 QSA** |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| * | ||||||||||||
| div div | ||||||||||||
| div > div | ||||||||||||
| div + div | ||||||||||||
| h2 + div | ||||||||||||
| div ~ div | ||||||||||||
| h2 ~ div | ||||||||||||
| div[class^=dia][class$=log] | ||||||||||||
| body | ||||||||||||
| body div | ||||||||||||
| div | ||||||||||||
| div div div | ||||||||||||
| div, div, div | ||||||||||||
| div, a, span | ||||||||||||
| .dialog | ||||||||||||
| div.dialog | ||||||||||||
| div.scene.dialog | ||||||||||||
| div .dialog | ||||||||||||
| div.character, div.dialog | ||||||||||||
| #speech5 | ||||||||||||
| div#speech5 | ||||||||||||
| div #speech5 | ||||||||||||
| div.scene div.dialog | ||||||||||||
| div#scene1 div.dialog div | ||||||||||||
| #scene1 #speech1 | ||||||||||||
| div[class] | ||||||||||||
| div[class=dialog] | ||||||||||||
| div[class^=dia] | ||||||||||||
| div[class$=log] | ||||||||||||
| div[class*=sce] | ||||||||||||
| div[class|=dialog] | ||||||||||||
| div[class!=madeup] | ||||||||||||
| div[class~=dialog] | ||||||||||||
| div[class!=""] | ||||||||||||
| div[style] | ||||||||||||
| div:only-child | ||||||||||||
| div:contains(CELIA) | ||||||||||||
| div:nth-child(even) | ||||||||||||
| div:nth-child(2n) | ||||||||||||
| div:nth-child(odd) | ||||||||||||
| div:nth-child(2n+1) | ||||||||||||
| div:nth-child(2n+0) | ||||||||||||
| div:nth-child(n+0) | ||||||||||||
| div:nth-child(4n+3) | ||||||||||||
| div:nth-child(2n-1) | ||||||||||||
| div:nth-child(0n+2) | ||||||||||||
| div:nth-child(-3n+2) | ||||||||||||
| div:nth-child(-1n+2) | ||||||||||||
| div:nth-child(-n+2) | ||||||||||||
| div:nth-child(5) | ||||||||||||
| div:last-child | ||||||||||||
| div:nth-last-child(3) | ||||||||||||
| div:nth-last-child(4n+3) | ||||||||||||
| div:nth-last-child(2n-1) | ||||||||||||
| div:nth-last-child(-3n+2) | ||||||||||||
| div:nth-last-child(-1n+2) | ||||||||||||
| div:first-child | ||||||||||||
| :first-child | ||||||||||||
| div:first-of-type | ||||||||||||
| div:nth-of-type(1) | ||||||||||||
| div:last-of-type | ||||||||||||
| div:nth-last-of-type(1) | ||||||||||||
| div:nth-of-type(even) | ||||||||||||
| div:nth-last-of-type(even) | ||||||||||||
| div:nth-of-type(odd) | ||||||||||||
| div:nth-last-of-type(odd) | ||||||||||||
| div:nth-of-type(2n) | ||||||||||||
| div:nth-of-type(2n+1) | ||||||||||||
| div:nth-last-of-type(2n) | ||||||||||||
| div:nth-last-of-type(2n+1) | ||||||||||||
| div:nth-of-type(2n-1) | ||||||||||||
| div:nth-last-of-type(2n-1) | ||||||||||||
| td[colspan!=1] | ||||||||||||
| td[rowspan!=1] | ||||||||||||
| td[colspan!="1"] | ||||||||||||
| td[colspan!='1'] | ||||||||||||
| td[colspan='2'] | ||||||||||||
| td[colspan!="0"] | ||||||||||||
| meta[http-equiv] | ||||||||||||
| input:checked | ||||||||||||
| *:checked | ||||||||||||
| input:disabled | ||||||||||||
| input:enabled | ||||||||||||
| input[value] | ||||||||||||
| option[selected] | ||||||||||||
| input[checked] | ||||||||||||
| input[disabled] | ||||||||||||
| input[readonly] | ||||||||||||
| label[for] | ||||||||||||
| div:empty | ||||||||||||
| td[title='test1" # . > ~ + test2[1]'] | ||||||||||||
| td[title="test1' # . > ~ + test2[1]"] | ||||||||||||
| #dave, input#dave | ||||||||||||
| div, div div | ||||||||||||
| span:lang(en) | ||||||||||||
| span:lang(en-us) | ||||||||||||
| span:lang(en-gb) | ||||||||||||
| :root | ||||||||||||
| final time (less is better) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| the faster | the slower | exception thrown or zero elements found | different returned elements |
|---|---|---|---|
* No tests have been removed from the original. Additional tests have been added. Notable among these are attribute-related queries, where failures usually indicates problems that go deeper than the query engine. Failures among the "majors" are prevalent in IE, as well as older "deprecated" browsers.
** Uses built-in queries where available.
† Browser sniffing indicates a shifting multi-browser script, as opposed to a cross-browser script that is suitable for use on the Web.
Back to Speed Tests