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="//cdnjs.cloudflare.com/ajax/libs/ramda/0.30.0/ramda.min.js"></script>
const generateObj = (id) => ({ id });
const nestedArr10 = new Array(10);
const testArr10 = new Array(10);
let i = 1;
while (i < 10) {
const obj = generateObj(i++);
nestedArr10[i - 1] = { obj };
testArr10[10 - i] = { ...obj };
}
const nestedArr100 = new Array(100);
const testArr100 = new Array(100);
i = 1;
while (i < 100) {
const obj = generateObj(i++);
nestedArr100[i - 1] = { obj };
testArr100[100 - i] = { ...obj };
}
const nestedArr1000 = new Array(1000);
const testArr1000 = new Array(1000);
i = 1;
while (i < 1000) {
const obj = generateObj(i++);
nestedArr1000[i - 1] = { obj };
testArr1000[1000 - i] = { ...obj };
}
Ready to run.
Test | Ops/sec | |
---|---|---|
".find" 10 |
| ready |
"indexBy" 10 |
| ready |
".find" 100 |
| ready |
"indexBy" 100 |
| ready |
".find" 1000 |
| ready |
"indexBy" 1000 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.