jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
A test case to determine which jQuery approach is the best (performance-wise) when query'ing DOM elements.
<table id="stats" cellpadding="0" cellspacing="0">
<thead>
<tr>
<td>A</td>
<td>B</td>
<td>C</td>
<td>D</td>
</tr>
</thead>
<tfoot></tfoot>
<tbody>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td><a class="anchor" href="#" rel="external">Link</a></td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td><a class="anchor" href="#" rel="external">Link</a></td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td><a class="anchor" href="#" rel="external">Link</a></td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td><a class="anchor" href="#" rel="external">Link</a></td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td><a class="anchor" href="#" rel="external">Link</a></td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td><a class="anchor" href="#" rel="external">Link</a></td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td><a class="anchor" href="#" rel="external">Link</a></td>
</tr>
<tr class="target">
<td>1</td>
<td>2</td>
<td>3</td>
<td><a class="anchor" href="#" rel="external">Link</a></td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td><a class="anchor" href="#" rel="external">Link</a></td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td><a class="anchor" href="#" rel="external">Link</a></td>
</tr>
</tbody>
</table>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Default CSS-like approach |
| ready |
With context and prefixed with tags |
| ready |
Using the find() method |
| ready |
Using a more exotic selector |
| ready |
Descendant selector (instead of class) |
| ready |
Using find() and a more specific selector |
| ready |
css selector style, with element prefix |
| ready |
find() with element prefix |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.