GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: remove unreachable code from crypto/hash-stream-creation · nodejs/node@ec72cb4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • benchmark/crypto
    • hash-stream-creation.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎benchmark/crypto/hash-stream-creation.js‎

Copy file name to clipboardExpand all lines: benchmark/crypto/hash-stream-creation.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ function legacyWrite(algo, message, encoding, writes, len, outEnc) {
5252
while (writes-- > 0) {
5353
const h = crypto.createHash(algo);
5454
h.update(message, encoding);
55-
let res = h.digest(outEnc);
56-
57-
// Include buffer creation costs for older versions
58-
if (outEnc === 'buffer' && typeof res === 'string')
59-
res = Buffer.from(res, 'binary');
55+
h.digest(outEnc);
6056
}
6157

6258
bench.end(gbits);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.