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="//code.jquery.com/jquery-1.8.2.min.js">
</script>
<p id="text">
Test text
</p>
<script>
var jstext = document.getElementById('text'),
$text = $('#text'),
To_Text;
//feature check, modern browsers support .textContent
if (jstext.textContent) {
To_Text = function(elm, text) {
elm.textContent = text;
};
} else {
// ie < 9
To_Text = function(elm, text) {
elm.innerText = text;
};
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
jQuery - html() |
| ready |
jQuery - text() |
| ready |
Vainilla Js - textContent or innerText |
| ready |
Vainilla Js - innerHTML (not a good way) |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.