jQuery Selector Perf - Right-to-Left
JavaScript performance comparison
Info
Demonstrating Right To Left Thinking, and validating its performance for this case.
Preparation code
<div id="parent">
<p class="child">
Why Right to Left Thinking is Good
</p>
<p class="child">
Blah Blah Blah
</p>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
Preparation code output
Why Right to Left Thinking is Good
Blah Blah Blah
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
"Left to Write" Thinking |
|
pending… |
"Right to Left" |
|
pending… |
Alternate "Right to Left" |
|
pending… |
Using child selector |
|
pending… |
pure JS |
|
pending… |
JS kickstarted jQuery |
|
pending… |
Pure JS querySelector |
|
pending… |
Pure JS querySelector children |
|
pending… |
Pure JS children |
|
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 Jeffrey Way
- Revision 32: published
- Revision 37: published
- Revision 38: published
- Revision 40: published
- Revision 41: published
- Revision 44: published
- Revision 45: published
- Revision 46: published
- Revision 47: published
- Revision 48: published
- Revision 49: published
- Revision 50: published by ShiningRay
- Revision 52: published
- Revision 54: published
- Revision 55: published by tick
- Revision 56: published
- Revision 57: published
- Revision 58: published by MoonScript
- Revision 59: published by richard
- Revision 60: published
- Revision 61: published
- Revision 62: published
- Revision 63: published
- Revision 64: published
- Revision 65: published
- Revision 68: published by m--s
- Revision 69: published by devu
- Revision 70: published by Scott Kosman
- Revision 71: published
- Revision 74: published
- Revision 75: published
- Revision 83: published
- Revision 84: published
- Revision 87: published
- Revision 88: published by Chris Miller
- Revision 89: published by Chris Miller
- Revision 90: published by Chris Miller
- Revision 91: published
- Revision 92: published by Dominik Nejdl
- Revision 93: published
- Revision 94: published
- Revision 95: published by Marco Pfeiffer
- Revision 97: published
- Revision 98: published
- Revision 99: published
- Revision 101: published
- Revision 102: published
- Revision 103: published
- Revision 104: published by BinaryKitten
- Revision 105: published
- Revision 106: published by Reith
- Revision 107: published
- Revision 108: published
0 comments