Skip to content

Commit

Permalink
benchmarks: add unrolled noble sha3 package
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Nov 17, 2023
1 parent f98371b commit f7d1626
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
2 changes: 2 additions & 0 deletions benchmark/hashes.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const stable3 = require('@stablelib/sha3');
const stableb2b = require('@stablelib/blake2b');
const stableb2s = require('@stablelib/blake2s');
const jssha3 = require('js-sha3');
const nobleUnrolled = require('unrolled-nbl-hashes-sha3');
const { SHA3: _SHA3 } = require('sha3');
const wasm_ = require('hash-wasm');
const wasm = {};
Expand Down Expand Up @@ -59,6 +60,7 @@ const HASHES = {
stablelib: (buf) => new stable3.SHA3256().update(buf).digest(),
'js-sha3': (buf) => wrapBuf(jssha3.sha3_256.create().update(buf).arrayBuffer()),
sha3: (buf) => new _SHA3(256).update(Buffer.from(buf)).digest(),
'noble (unrolled)': (buf) => nobleUnrolled.sha3_256(buf),
noble: (buf) => sha3_256(buf),
},
Kangaroo12: { noble: (buf) => k12(buf) },
Expand Down
41 changes: 21 additions & 20 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,26 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@stablelib/blake2b": "^1.0.1",
"@stablelib/blake2s": "^1.0.1",
"@stablelib/hkdf": "^1.0.1",
"@stablelib/hmac": "^1.0.1",
"@stablelib/pbkdf2": "^1.0.1",
"@stablelib/scrypt": "^1.0.1",
"@stablelib/sha256": "^1.0.1",
"@stablelib/sha3": "^1.0.1",
"@stablelib/sha384": "^1.0.1",
"@stablelib/sha512": "^1.0.1",
"@stablelib/sha512_256": "^1.0.1",
"create-hash": "^1.2.0",
"create-hmac": "^1.1.7",
"fast-sha256": "^1.3.0",
"hash-wasm": "^4.9.0",
"js-sha3": "^0.8.0",
"libsodium-wrappers": "^0.7.10",
"scrypt-async": "^2.0.1",
"scrypt-js": "^3.0.1",
"sha3": "^2.1.4"
"@stablelib/blake2b": "1.0.1",
"@stablelib/blake2s": "1.0.1",
"@stablelib/hkdf": "1.0.1",
"@stablelib/hmac": "1.0.1",
"@stablelib/pbkdf2": "1.0.1",
"@stablelib/scrypt": "1.0.2",
"@stablelib/sha256": "1.0.1",
"@stablelib/sha3": "1.0.1",
"@stablelib/sha384": "1.0.1",
"@stablelib/sha512": "1.0.1",
"@stablelib/sha512_256": "1.0.1",
"create-hash": "1.2.0",
"create-hmac": "1.1.7",
"fast-sha256": "1.3.0",
"hash-wasm": "4.11.0",
"js-sha3": "0.9.2",
"libsodium-wrappers": "0.7.13",
"scrypt-async": "2.0.1",
"scrypt-js": "3.0.1",
"sha3": "2.1.4",
"unrolled-nbl-hashes-sha3": "0.1.1"
}
}

0 comments on commit f7d1626

Please sign in to comment.