Skip to content

Instantly share code, notes, and snippets.

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

  • Save yongkangc/0f847a054db12943aff7a0ba1c630054 to your computer and use it in GitHub Desktop.

Select an option

Save yongkangc/0f847a054db12943aff7a0ba1c630054 to your computer and use it in GitHub Desktop.
reth from_reverts bench

from_reverts bench (reth-trie-db)

Dataset: 1 block of 256 accounts × 4 slots (Account/StorageChangeSets). Keccak hashing.

Results (Criterion, 100 samples, flat sampling):

  • from_reverts unsorted → 872.3 µs (median)
  • from_reverts sorted → 882.1 µs (median)

Observation: the sorted path is ~1.1% slower on this small dataset. The extra sort avoidance isn’t visible at this scale; overhead likely dominated by hashing and cursor walks. Larger or more skewed datasets may show wins; this run mostly confirms parity.

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

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