jQuery Cached Set
JavaScript performance comparison
Info
Compare performance of cached vs repeated element selections
Preparation code
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<table id="rankTable" style="word-break: break-all; min-width: 956px; width: 250px;">
<tr class="trRank"><td>a</td></tr>
<tr class="trRank"><td>b</td></tr>
<tr class="trRank"><td>c</td></tr>
<tr class="trRank"><td>d</td></tr>
<tr class="trRank"><td>e</td></tr>
</table>
<script>
</script>
Preparation code output
| a |
| b |
| c |
| d |
| e |
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Cached elements |
|
pending… |
No cache |
|
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 Nilayan Sharma
- Revision 3: published
- Revision 4: published
- Revision 6: published
- Revision 7: published
- Revision 8: published by Christopher
- Revision 9: published
- Revision 10: published
- Revision 11: published
- Revision 12: published
- Revision 18: published
- Revision 19: published
- Revision 20: published
- Revision 22: published
- Revision 23: published
- Revision 24: published
- Revision 25: published
- Revision 26: published
- Revision 29: published
- Revision 30: published
- Revision 31: published
- Revision 32: published
- Revision 33: published
- Revision 34: published
- Revision 35: published
- Revision 36: published
- Revision 37: published
0 comments