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
Tests various methods of creating a Map
const entries = Array.from({length: 10000}, ((_, idx) => ({
k1: `key1-${idx}`,
k2: `key2-${idx}`,
k3: Math.random() > 0.5 ? `key3-${idx}` : null,
k4: `key4-${idx}`,
})))
function createKey({k1, k2, k3,k4}) {
return `${k1} | ${k2} | ${k3 ?? null} | ${k4}`
}
Ready to run.
Test | Ops/sec | |
---|---|---|
individual set for...of |
| ready |
Map constructor |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.