diff options
author | 2023-04-21 07:18:32 -0700 | |
---|---|---|
committer | 2023-04-21 07:18:32 -0700 | |
commit | 613bb4822ee8f4fbfd78aef391e2db8f07659a6f (patch) | |
tree | 0b93003e28ecf0cde1d9bc3c58fad4dabfa880b3 /bench/snippets/crypto-stream.mjs | |
parent | a4d0a1961abe0c6073e15cc6f7c0601b74f2e3f7 (diff) | |
download | bun-613bb4822ee8f4fbfd78aef391e2db8f07659a6f.tar.gz bun-613bb4822ee8f4fbfd78aef391e2db8f07659a6f.tar.zst bun-613bb4822ee8f4fbfd78aef391e2db8f07659a6f.zip |
Revert "use a lazyily initialized stream for `node:crypto` `createHash` (#2652)"
This reverts commit 3a2fd65f20d3b4e99c89f789acec5e5e40615008.
Diffstat (limited to 'bench/snippets/crypto-stream.mjs')
-rw-r--r-- | bench/snippets/crypto-stream.mjs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/bench/snippets/crypto-stream.mjs b/bench/snippets/crypto-stream.mjs deleted file mode 100644 index 3560563d9..000000000 --- a/bench/snippets/crypto-stream.mjs +++ /dev/null @@ -1,26 +0,0 @@ -// https://github.com/oven-sh/bun/issues/2190 -import { bench, run } from "mitata"; -import { createHash } from "node:crypto"; - -const data = - "Delightful remarkably mr on announcing themselves entreaties favourable. About to in so terms voice at. Equal an would is found seems of. The particular friendship one sufficient terminated frequently themselves. It more shed went up is roof if loud case. Delay music in lived noise an. Beyond genius really enough passed is up."; - -const scenarios = [ - { alg: "md5", digest: "hex" }, - { alg: "md5", digest: "base64" }, - { alg: "sha1", digest: "hex" }, - { alg: "sha1", digest: "base64" }, - { alg: "sha256", digest: "hex" }, - { alg: "sha256", digest: "base64" }, -]; - -for (const { alg, digest } of scenarios) { - bench(`${alg}-${digest}`, () => { - const hasher = createHash(alg); - hasher.write(data); - hasher.end(); - hasher.read(); - }); -} - -run(); |