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
function generateLargeObject(depth = 3, breadth = 5, arraySize = 10) {
function createNestedObject(level) {
if (level === 0) {
return {
data: Array.from({ length: arraySize }, (_, i) => `Item ${i}`),
value: Math.random(),
};
}
const obj = {};
for (let i = 0; i < breadth; i++) {
obj[`key${level}_${i}`] = createNestedObject(level - 1);
}
return obj;
}
return createNestedObject(depth);
}
const obj = generateLargeObject(7, 7, 20);
Ready to run.
Test | Ops/sec | |
---|---|---|
Structuredclone |
| ready |
arrayBuffer |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.