yet another jQuery selector test
JavaScript performance comparison
Info
Some more benchmarking tests based on comments at my jQuery Performance article at 24ways.org
http://24ways.org/2011/your-jquery-now-with-less-suck
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<section>
<div id="content">
<p>
foo
</p>
</div>
</section>
Preparation code output
foo
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
multi-element |
|
pending… |
fewer elements in selector |
|
pending… |
complex .find() |
|
pending… |
simplified .find() |
|
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 Kosman
2 comments
Many thanks for setting this up Scott. Brilliant! Very enlightening! Off now to rewrite a lot of my code!
This is great, I didn't know about the right to left parsing. Thanks.