Skip to content

Instantly share code, notes, and snippets.

@yongkangc
Created December 1, 2025 06:44
Show Gist options
  • Select an option

  • Save yongkangc/6c71ef73bb83a2b2a00d987fb18e0f0e to your computer and use it in GitHub Desktop.

Select an option

Save yongkangc/6c71ef73bb83a2b2a00d987fb18e0f0e to your computer and use it in GitHub Desktop.
reth overlay_root bench

overlay_root bench (reth-trie-db)

Dataset: 1 block, 256 accounts × 4 slots seeded into Account/StorageChangeSets. Keccak hashing.

Results (Criterion, 100 samples, flat sampling):

  • overlay_root unsorted (HashedPostState) → 1.826 ms median
  • overlay_root_sorted (HashedPostStateSorted) → 1.699 ms median

Impact: Sorted fast-path is ~7.5% faster for this setup by skipping the HashMap→Vec conversion and using the sorted prefix-set builder. Hashing still dominates; larger/denser workloads may show bigger gaps.

Command: CARGO_TARGET_DIR=./target cargo bench -p reth-trie-db overlay_root

Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment