jQuery Selector
JavaScript performance comparison
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<ul id="stuff">
<li rel="fuzzy">cats</li>
<li rel="hairy">dogs</li>
<li rel="big">moose</li>
<li rel="feathers">chicken</li>
<li rel="gobblegobble">turkey</li>
<li rel="blahbleep">blah</li>
<li rel="blubbloop">blub</li>
<li rel="fuzzy2">cats2</li>
<li rel="hairy2">dogs2</li>
<li rel="big2">moose2</li>
<li rel="feathers2">chicken2</li>
<li rel="gobblegobble2">turkey2</li>
<li rel="blahbleep2">blah2</li>
<li rel="blubbloop2">blub2</li>
<li rel="fuzzy3">cats3</li>
<li rel="hairy3">dogs3</li>
<li rel="big3">moose3</li>
<li rel="feathers3">chicken3</li>
<li rel="gobblegobble3">turkey3</li>
<li rel="blahbleep3">blah3</li>
<li rel="blubbloop3">blub3</li>
<li rel="fuzzy4">cats4</li>
<li rel="hairy4">dogs4</li>
<li rel="big4">moose4</li>
<li rel="feathers4">chicken4</li>
<li rel="gobblegobble4">turkey4</li>
<li rel="blahbleep4">blah4</li>
<li rel="blubbloop4">blub4</li>
</ul>
<script>
Benchmark.prototype.setup = function() {
var e;
var rel;
};
</script>
Preparation code output
- cats
- dogs
- moose
- chicken
- turkey
- blah
- blub
- cats2
- dogs2
- moose2
- chicken2
- turkey2
- blah2
- blub2
- cats3
- dogs3
- moose3
- chicken3
- turkey3
- blah3
- blub3
- cats4
- dogs4
- moose4
- chicken4
- turkey4
- blah4
- blub4
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Children |
|
pending… |
Find |
|
pending… |
jQuery 4 |
|
pending… |
No jQuery Children |
|
pending… |
No jQuery |
|
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
- Revision 2: published
- Revision 3: published
0 comments