diff options
author | 2022-12-29 06:03:24 -0800 | |
---|---|---|
committer | 2022-12-29 06:05:43 -0800 | |
commit | 01c81a5f5784a8af2f27ac92f122aa343c1f1fca (patch) | |
tree | 316cf3e33eac95a4ed734a8139835bbae7c186bd /bench/snippets/crypto-hasher.mjs | |
parent | 85eda2058755261bf5ac64a3d82112d7bad5419c (diff) | |
download | bun-01c81a5f5784a8af2f27ac92f122aa343c1f1fca.tar.gz bun-01c81a5f5784a8af2f27ac92f122aa343c1f1fca.tar.zst bun-01c81a5f5784a8af2f27ac92f122aa343c1f1fca.zip |
[node:crypto] 50x faster `createHash`
Diffstat (limited to 'bench/snippets/crypto-hasher.mjs')
-rw-r--r-- | bench/snippets/crypto-hasher.mjs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bench/snippets/crypto-hasher.mjs b/bench/snippets/crypto-hasher.mjs index 1e850e19f..73835bc0c 100644 --- a/bench/snippets/crypto-hasher.mjs +++ b/bench/snippets/crypto-hasher.mjs @@ -3,8 +3,8 @@ import { bench, run } from "mitata"; import crypto from "node:crypto"; -var foo = new Uint8Array(65536); -crypto.getRandomValues(foo); +var foo = Buffer.allocUnsafe(16384); +foo.fill(123); // if ("Bun" in globalThis) { // const { CryptoHasher } = Bun; |