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 generateArray(size) {
const array = [];
for (let i = 1; i <= size; i++) {
array.push({
id: i.toString(),
properties: {
useVariableName: Math.random() > 0.5,
variableName: `var${i}`,
name: `name${i}`
}
});
}
return array;
}
let a = generateArray(1000);
let b = {
'1': 'value1',
'var2': 'value2',
'var3': 'value3',
'3': 'value3',
'100': 'value100',
};
let updatedB = {};
Ready to run.
Test | Ops/sec | |
---|---|---|
ForEach |
| ready |
Reduce |
| ready |
For loop |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.