http://mootools.net/slickspeed/ 测试主流Javascript框架selector方法在各浏览器上的速度。与DOM有关。
Firefox 3.0.1(SpiderMonkey) test instances no.01-05(unit: ms) avg. mid. rank blocker method
MooTools 1.2 140 146 141 140 144 142.2 141 4th :nth-child
JQuery 1.2.6 149 152 152 150 154 151.4 152 4th a[href][lang][class]
Prototype 1.6.0.2 228 231 231 234 230 230.8 231 3rd parent child
YUI 2.5.2 Selector beta 352 352 350 349 350 350.6 350 4th parent child
Dojo 1.1.1 99 102 101 102 102 101.2 102 4th :contains(selectors)
Opera 9.52(Presto "Futhark")
MooTools 1.2 68 60 56 60 60 60.8 60 2nd :first-child
JQuery 1.2.6 60 52 64 48 72 59.2 60 2nd a[href][lang][class]
Prototype 1.6.0.2 76 72 76 72 76 74.4 76 1st :nth-child
YUI 2.5.2 Selector beta 261 281 253 273 258 265.2 261 1st :nth-child
Dojo 1.1.1 20 12 16 12 20 16 16 1st none
Safari 3.1.2(JavaScriptCore)
MooTools 1.2 40 40 40 40 36 39.2 40 1st .class
JQuery 1.2.6 40 32 32 36 36 35.2 36 1st :first-child
Prototype 1.6.0.2 100 100 100 116 100 103.2 100 2nd :nth-child
YUI 2.5.2 Selector beta 271 275 275 275 271 273.4 275 2nd :nth-child
Dojo 1.1.1 51 55 51 51 47 51 51 2nd parent ~ child
Internet Explorer 7.0(JScript)
MooTools 1.2 416 418 425 424 428 422.2 424 5th element1,element2
JQuery 1.2.6 286 290 295 295 299 293 295 5th :nth-child
Prototype 1.6.0.2 1698 1736 1740 1768 1738 1736 1738 5th parent ~ child
YUI 2.5.2 Selector beta 1072 1096 1103 1100 1119 1098 1100 5th :nth-child
Dojo 1.1.1 507 495 502 495 511 502 502 5th parent ~ child
Google Chrome 0.2.149.27(V8)
MooTools 1.2 94 107 124 114 106 109 107 3rd :contains(selectors)
JQuery 1.2.6 67 69 78 78 74 73.2 74 3rd a[href][lang][class]
Prototype 1.6.0.2 313 295 322 320 319 313.8 319 4th :nth-child
YUI 2.5.2 Selector beta 302 298 289 286 285 292 289 3rd :nth-child
Dojo 1.1.1 97 85 82 86 88 87.6 86 3rd parent ~ child
附opera 9.27测试结果。
140 120 128
124 144 144
269 269 258
493 511 502
48 56 52