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
Comparing four different methods to count the number of form elements in a document.
<form id="test">
<input type="text" />
<input type="password" />
<input type="checkbox" />
<input type="radio" />
<input type="hidden" />
<select>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<textarea>This is just a test...</textarea>
</form>
<p>
Number of elements: <b id="output"></b>
</p>
<script>
var oForm = document.getElementById('test'),
oCount = document.getElementById('output');
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
match |
| ready |
getElementsByTagName |
| ready |
querySelectorAll |
| ready |
while |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.