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
Testing the ability to load a link tag of type CSS with load event support.
<script>
var colors = ['#000000', '#000001', '#000002', '#000003', '#000004', '#000005'];
var loadCSS = function(url, callback) {
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = url;
document.getElementsByTagName('head')[0].appendChild(link);
var img = document.createElement('img');
img.onerror = function() {
var bk = document.body.style.backgroundColor;
var litmus = callback();
console.log(bk == litmus, bk, litmus);
document.head.removeChild(img);
}
document.head.appendChild(img);
img.src = url;
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
iterations |
| ready |
blank |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.