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
For a class that can appear on multiple tags, is it faster to clarify the selector for each tag or just use the class name
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div class="test">
<table>
<tr>
<td>
<input type="text" class="ui-editor-input" value="" />
</td>
<td>
<input type="button" class="ui-editor-input" value="" />
</td>
<td>
<input type="checkbox" class="ui-editor-input" value="" />
</td>
</tr>
<tr>
<td>
<input type="password" class="ui-editor-input" value="" />
</td>
<td>
<input type="submit" class="ui-editor-input" value="" />
</td>
<td>
<select class="ui-editor-input">
<option>
select 1
</option>
<option>
select 2
</option>
</select>
</td>
</tr>
<tr>
<td>
<input type="text" class="ui-editor-input" value="" />
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
<textarea class="ui-editor-input" rows="5" cols="5">
</textarea>
<textarea class="ui-editor-input" rows="5" cols="5">
</textarea>
</div>
Ready to run.
Test | Ops/sec | |
---|---|---|
.classname |
| ready |
multiple tag.classname |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.