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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
var onestring = 0;
var onestringhtml = "";
var addstring = "a";
var addhtml = "<p>a</p>";
var $appendcached = $('#appendcached');
var $appendhtmlcached = $('#appendhtmlcached');
</script>
<div style="display: none;">
<div id="plusequal"></div>
<div id="append"></div>
<div id="appendcached"></div>
<div id="appendto"></div>
<div id="onestring"></div>
<div id="plusequalhtml"></div>
<div id="appendhtml"></div>
<div id="appendhtmlcached"></div>
<div id="appendtohtml"></div>
<div id="onestringhtml"></div>
<div id="insertAdjacentHTML"></div>
</div>
if (onestring != 0) {
document.getElementById('plusequal').innerhHTML = onestring;
}
if (onestringhtml != 0) {
document.getElementById('plusequal').innerhHTML = onestringhtml;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
plusequal |
| ready |
append |
| ready |
append cached |
| ready |
appendTo |
| ready |
onestring |
| ready |
plusequal html |
| ready |
append html |
| ready |
append html cached |
| ready |
appendTo html |
| ready |
onestring html |
| ready |
insertAdjacentHTML |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.