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
const obj1 = {
prop1: true,
prop2: true,
prop3: true,
}
const obj2 = {
prop2: false,
prop4: false,
}
const assign1 = (target, ...sources) => {
sources.forEach((source) => {
return Object.keys(source).forEach((key) => {
target[key] = source[key]
})
})
return target
}
const assign2 = (...sources) => {
return sources.reduce((result, current) => {
return {
...result,
...current,
}
}, {})
}
Ready to run.
Test | Ops/sec | |
---|---|---|
v1 |
| ready |
v2 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.