jQuery Attribute selector performance
JavaScript performance comparison
Info
Test to see if jQuery filters by selector before doing attribute matching.
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<b class="t" name="test0"></b>
<b class="t" name="test0"></b>
<b class="t" name="test0"></b>
<b class="t" name="test1"></b>
<b class="t" name="test1"></b>
<b class="t" name="test1"></b>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Attribute matching only |
|
pending… |
class |
|
pending… |
Chained |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by Scott Walkinshaw
- Revision 2: published
- Revision 4: published
- Revision 5: published
- Revision 7: published
- Revision 8: published
- Revision 9: published
- Revision 10: published by jiang
- Revision 11: published
0 comments