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="https://cdn.jsdelivr.net/npm/lodash@4.17.23/lodash.min.js"></script>
function generateRes(size) {
const res = {};
const sections = ["user", "settings", "profile", "meta", "permissions"];
for (let i = 0; i < size; i++) {
const s = sections[i % sections.length];
if (i % 3 === 0) res[`${s}.${i}.label`] = "L" + i;
else if (i % 3 === 1) res[`${s}.${i}.value`] = "V" + i;
else res[`field_${i}`] = "F" + i;
}
return res;
}
const res = generateRes(50000);
let sink = 0;Ready to run.
| Test | Ops/sec | |
|---|---|---|
| native | | ready |
| lodash | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.