prefix set | size: 10 | `Vec` with custom cursor lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
-2%
3.3 µs3.3 µs
Commits
Click on a commit to change the comparison range
Base
main
4f5b842
+0.09%
feat(trie): add overlay root calculations for HashedPostStateSorted
- Add sorted variants of overlay root methods to `DatabaseStateRoot` trait that accept pre-sorted HashedPostStateSorted directly, avoiding the unsorted map allocation and sort step when callers already have sorted data.
Key additions:
- HashedPostStateSorted::construct_prefix_sets_sorted() builds prefix sets by walking sorted vecs directly instead of rebuilding a HashMap
- overlay_root_sorted{_with_updates} methods on DatabaseStateRoot
- overlay_root_from_nodes_sorted{_with_updates} for TrieInputSorted
Migrate historical provider to use sorted paths throughout:
- revert_state() now returns HashedPostStateSorted
- state_root() and state_root_with_updates() use overlay_root_sorted
- Uses extend_ref() to merge sorted states
This eliminates redundant allocations when computing state roots for historical blocks, where revert data comes from the database already in sorted key order.
c341f23
2 hours ago
by yongkangc
-0.13%
Revert "Revert "feat(trie): add overlay root calculations for HashedPostStateSorted""
This reverts commit 32f16f8c785618e608d3c24f22db99427d79f2c1.
0a15ec0
2 hours ago
by yongkangc
+0.21%
Revert "feat(benches): add benchmark for overlay root calculations"
This reverts commit 61ed453e28d0e4a6127f8c49ec5d26258c19e99f.