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 generateUUID = () => (
[1e7] + -1e3 + -4e3 + -8e3 + -1e11
).replace(
/[018]/g,
c => (
c ^ (
crypto.getRandomValues(
new Uint8Array(1)
)[0] & (15 >> (c / 4))
)
).toString(16)
);
const arr1 = Array.from({length: 1000}, generateUUID);
const arr2 = [...arr1];
arr2[arr2.length - 1] = generateUUID();
Ready to run.
Test | Ops/sec | |
---|---|---|
via stringify |
| ready |
via every() comparison |
| ready |
via for comparison |
| ready |
via for comparison (len init) |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.