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
<canvas id='canvas'/>
const texts = [];
const maxLen = 50;
const size = 4000;
for (let i=0; i<size; ++i) {
const len = Math.floor(Math.random() * maxLen);
let text = "";
for(let j=0; j<len; ++j) {
const char = String.fromCharCode(65 + Math.floor(Math.random() * 58));
text += char;
}
texts.push(text);
}
canvasCtx = document.getElementById('canvas').getContext('2d');
canvasCtx.font = '10px sans-serif';
i = 0;
Ready to run.
Test | Ops/sec | |
---|---|---|
Test with different length of texts |
| ready |
Same test |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.