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
Tests performance of appending DOM multiple times in each for loop VS. adding to an array in each loop and appending array to DOM once following the loop.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<div id="testContainer" style="display:none;">
<div id="test1"></div>
<div id="test2"></div>
</div>
<script>
var t1 = $("#test1");
var t2 = $("#test2");
var t2a = [];
var loops = 20;
var testLoop = 0;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
jQuery appendTo |
| ready |
Array push/join |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.