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 arr = [...Array(256).keys()];
const arr8 = new Uint8Array(arr);
const map = arr.reduce((a,c) => { a.set(c, c); return a }, new Map());
const obj = arr.reduce((a,c) => { a[c] = c; return a }, {});
const dataView = new DataView(arr8.buffer);
Ready to run.
Test | Ops/sec | |
---|---|---|
access array at index |
| ready |
access typed array at index |
| ready |
access map at index |
| ready |
access buffer through dataView |
| ready |
access object by key |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.