diff --git a/benchmark/crypto/hash-stream-creation.js b/benchmark/crypto/hash-stream-creation.js index c21eb6eaaaed99..e480c7b6edcc41 100644 --- a/benchmark/crypto/hash-stream-creation.js +++ b/benchmark/crypto/hash-stream-creation.js @@ -52,11 +52,7 @@ function legacyWrite(algo, message, encoding, writes, len, outEnc) { while (writes-- > 0) { const h = crypto.createHash(algo); h.update(message, encoding); - let res = h.digest(outEnc); - - // Include buffer creation costs for older versions - if (outEnc === 'buffer' && typeof res === 'string') - res = Buffer.from(res, 'binary'); + h.digest(outEnc); } bench.end(gbits);