Contenders:
- noble-hashes
- @stablelib/sha256 and @stablelib/sha512
- Native browser crypto.subtle.digest
Tested on Mac OS Monterey, Apple M1 Max chip.
Chrome 105.0.5195.125:
Firefox 105.0.1:
Safari 16.0 (17614.1.25.9.10, 17614):
UPD: What if use await
for calling noble
and stable
libs:
pnpm install && pnpm run start:browser
Then open http://localhost:3000
in browser and see benchmark results in the browser console.
To run same (crypto.subtle
repalced with native Node.js crypto
module) benchmark on Node.js:
pnpm install && pnpm run start:node
Made with createapp.dev