mpt: benchmark unrolled-nbl-hashes-sha3 for keccak256 speedup#4272
Open
gabrocheleau wants to merge 1 commit into
Open
mpt: benchmark unrolled-nbl-hashes-sha3 for keccak256 speedup#4272gabrocheleau wants to merge 1 commit into
gabrocheleau wants to merge 1 commit into
Conversation
Evaluate unrolled-nbl-hashes-sha3 as suggested in #3227 to speed up keccak256 hashing. Adds a standalone microbenchmark and extends the existing MPT benchmark suite to accept a configurable hash function, enabling side-by-side comparison of @noble/hashes vs the unrolled variant. Microbenchmark results show 4-7x raw hash throughput improvement. Also fixes micro-bmark import compatibility (logMem -> utils.logMem, run() removed as it is not exported in current version).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
📦 Bundle Size Analysis
Values are minified+gzipped bundles of each package entry. Workspace deps are bundled; external deps are excluded. Generated by bundle-size workflow |
Contributor
|
https://github.com/paulmillr/awasm-noble went live now. Try it out: import { keccak256 } from '@awasm/noble'; // wasm
import { keccak256 } from '@awasm/noble/wasm_threads.js'; // +threads
import { keccak256 } from '@awasm/noble/js.js'; // faster JS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@noble/hashesvsunrolled-nbl-hashes-sha3(ref VM performance meta-issue #3227)micro-bmarkimport compatibility (logMem→utils.logMem, removes non-exportedrun)Benchmark Results
Raw keccak256 throughput
MPT trie-level benchmarks
No measurable difference at trie level — DB I/O and RLP encoding dominate