From 5c05186febdba11a70ef481eaafe342be2f71fde Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Thu, 8 Oct 2026 09:02:26 -0300 Subject: [PATCH] benchmark: fix input passed to subtle.digest in webcrypto-digest The data is already a random Buffer, so passing it through TextEncoder decoded it as UTF-8 and re-encoded it, making subtle.digest hash a different and larger input than createHash. Signed-off-by: RafaelGSS --- benchmark/crypto/webcrypto-digest.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/benchmark/crypto/webcrypto-digest.js b/benchmark/crypto/webcrypto-digest.js index f5ef8e6bc493..e25181a3c3d6 100644 --- a/benchmark/crypto/webcrypto-digest.js +++ b/benchmark/crypto/webcrypto-digest.js @@ -33,8 +33,6 @@ function measureLegacy(n, data, method) { } function measureSubtle(n, data, method) { - const ec = new TextEncoder(); - data = ec.encode(data); const jobs = new Array(n); bench.start(); for (let i = 0; i < n; i++)