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 b64(a) {
return btoa(String.fromCodePoint.apply(null, Array.from(a)));
}
async function hash(s, i) {
const st = crypto.getRandomValues(new Uint8Array(16));
const hh = await hash2(s, st, i);
return b64(st) + b64(hh);
}
async function hash2(s, salt, iterations) {
const a = new TextEncoder().encode(s);
const kk = await crypto.subtle.importKey(
"raw", a, "PBKDF2", false, ["deriveBits"],
);
const b = await crypto.subtle.deriveBits(
{ name: "PBKDF2", hash: "SHA-256", salt, iterations },
kk,
256,
);
return new Uint8Array(b);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
1e5 |
| ready |
5e5 |
| ready |
1e6 |
| ready |
5e6 |
| ready |
1e7 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.