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
<div id="benchmark-container">
<canvas id="benchmark-canvas" width="800" height="150"></canvas>
</div>
const canvas = document.getElementById('benchmark-canvas');
const ctx = canvas.getContext('2d');
ctx.font = '16px Arial';
// Generate test strings of different lengths
function generateString(length) {
return 'x'.repeat(length);
}
const testStrings = {
tiny: generateString(10),
small: generateString(100),
medium: generateString(1000),
large: generateString(10000),
huge: generateString(100000)
};
Ready to run.
Test | Ops/sec | |
---|---|---|
len: 10 |
| ready |
len: 100 |
| ready |
len: 1000 |
| ready |
len: 10000 |
| ready |
len: 100000 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.