paradigmxyz
reth
BlogDocsChangelog

perf(trie): fix O(N²) reuse overlay in deferred trie overlay computation

#20774
Comparing
fix/deferred-trie-on2-complexity
(
190477d
) with
main
(
3ca5cf4
)
CodSpeed Performance Gauge
0%
Untouched
118
Skipped
7

Benchmarks

Skipped (7)

Passed

size 100000 | updated 0.1% | depth 5
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
+3%
1.1 ms1.1 ms
Legacy[dataset_128/targets_512]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
+2%
1,015.1 µs998.1 µs
size 100000 | updated 1% | depth 5
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
+2%
8.4 ms8.3 ms
V2[dataset_1024/targets_2048]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
+1%
11.5 ms11.4 ms
hash builder[init size 10000 | update size 100 | num updates 3]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
+1%
27 ms26.6 ms
size 100000 | updated 0.1% | depth 2
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
+1%
3.5 ms3.4 ms
size 100000 | updated 0.1% | depth 1
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
+1%
3.7 ms3.6 ms
size 100000 | updated 0.1% | depth 0
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
+1%
3.7 ms3.6 ms
hash builder[init size 10000 | update size 100 | num updates 1]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
+1%
9.6 ms9.5 ms
hash builder[init size 10000 | update size 100 | num updates 5]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
+1%
43.9 ms43.5 ms
prefix set | size: 10 | `BTreeSet` with `Iterator:any` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
+1%
3.9 µs3.9 µs
hash builder[init size 10000 | update size 1000 | num updates 1]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
+1%
26.2 ms26 ms
hash builder[init size 1000 | update size 1000 | num updates 1]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
+1%
5.7 ms5.7 ms
size 100000 | updated 1% | depth 4
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
+1%
11.5 ms11.4 ms
hash builder[init size 1000 | update size 100 | num updates 10]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
24.7 ms24.6 ms
V2[dataset_128/targets_128]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
754.9 µs751.5 µs
size 100000 | updated 1% | depth 3
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
0%
21.8 ms21.7 ms
sparse trie[init size 1000 | update size 100 | num updates 1]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
Legacy[dataset_128/targets_16]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
738.6 µs735.7 µs
sparse trie[1000]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves::calculate root from leaves
CodSpeed Performance Gauge
0%
5.7 ms5.7 ms
receipts root | size: 10 | HashBuilder
crates/trie/trie/benches/trie_root.rs::benches::trie_root_benchmark::Receipts root calculation
CodSpeed Performance Gauge
0%
112 µs111.7 µs
V2[dataset_128/targets_16]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
698.3 µs696.2 µs
hash builder[init size 10000 | update size 1000 | num updates 3]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
77.1 ms76.9 ms
hash builder[5000]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves::calculate root from leaves
CodSpeed Performance Gauge
0%
22.3 ms22.2 ms
Legacy[dataset_1024/targets_512]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
15.4 ms15.4 ms
size 100000 | updated 0.1% | depth 3
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
0%
2.5 ms2.5 ms
V2[dataset_10240/targets_1]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
637.9 ms636.5 ms
Legacy[dataset_10240/targets_1]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
637.7 ms636.3 ms
V2[dataset_10240/targets_64]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
638.2 ms636.9 ms
Legacy[dataset_10240/targets_64]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
646 ms644.8 ms
V2[dataset_10240/targets_128]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
638.5 ms637.3 ms
Legacy[dataset_10240/targets_128]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
654.5 ms653.3 ms
hash builder[init size 10000 | update size 1000 | num updates 10]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
252.8 ms252.4 ms
V2[dataset_10240/targets_16]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
637.9 ms636.8 ms
Legacy[dataset_128/targets_128]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
859.6 µs858.1 µs
V2[dataset_128/targets_64]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
732.2 µs731 µs
Legacy[dataset_10240/targets_16]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
639.3 ms638.3 ms
hash builder[init size 1000 | update size 1000 | num updates 10]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
56.9 ms56.8 ms
sparse trie[init size 1000 | update size 1000 | num updates 5]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
24.9 ms24.9 ms
Legacy[dataset_128/targets_64]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
809.2 µs808.1 µs
hash builder[init size 1000 | update size 1000 | num updates 5]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
28.5 ms28.5 ms
size 100000 | updated 1% | depth 1
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
0%
24.8 ms24.8 ms
V2[dataset_10240/targets_512]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
638.9 ms638.1 ms
size 100000 | updated 1% | depth 0
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
0%
24.8 ms24.7 ms
validate_blob | num blobs: 5 | ValidateBlob
crates/primitives/benches/validate_blob_tx.rs::validate_blob::blob_validation::Blob Transaction KZG validation
CodSpeed Performance Gauge
0%
153.5 µs153.3 µs
size 100000 | updated 1% | depth 2
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
0%
24.6 ms24.6 ms
Legacy[dataset_10240/targets_512]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
703.4 ms702.7 ms
sparse trie[5000]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves::calculate root from leaves
CodSpeed Performance Gauge
0%
28.3 ms28.3 ms
sparse trie[init size 1000 | update size 100 | num updates 10]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
10.8 ms10.8 ms
Legacy[dataset_1024/targets_1]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
10.5 ms10.5 ms
sparse trie[init size 1000 | update size 100 | num updates 5]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
5.4 ms5.4 ms
sparse trie[init size 1000 | update size 1000 | num updates 10]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
49.7 ms49.6 ms
hash builder[init size 1000 | update size 1000 | num updates 3]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
17.2 ms17.2 ms
collect_twice[10000]
crates/trie/common/benches/hashed_state.rs::benches::bench_from_parallel_iterator::HashedPostState::from_par_iter
CodSpeed Performance Gauge
0%
6.8 ms6.8 ms
prefix set | size: 1000 | `BTreeSet` with `BTreeSet:range` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
0%
469.6 µs469.4 µs
sparse trie[init size 10000 | update size 1000 | num updates 3]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
33.8 ms33.8 ms
validate_blob | num blobs: 1 | ValidateBlob
crates/primitives/benches/validate_blob_tx.rs::validate_blob::blob_validation::Blob Transaction KZG validation
CodSpeed Performance Gauge
0%
146.8 µs146.7 µs
prefix set | size: 1000 | `Vec` with custom cursor lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
0%
146.3 µs146.2 µs
recover ECDSA
crates/primitives/benches/recover_ecdsa_crit.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
206.7 µs206.6 µs
validate_blob | num blobs: 3 | ValidateBlob
crates/primitives/benches/validate_blob_tx.rs::validate_blob::blob_validation::Blob Transaction KZG validation
CodSpeed Performance Gauge
0%
151.3 µs151.3 µs
Legacy[dataset_128/targets_1]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
705.6 µs705.4 µs
collect_twice[50000]
crates/trie/common/benches/hashed_state.rs::benches::bench_from_parallel_iterator::HashedPostState::from_par_iter
CodSpeed Performance Gauge
0%
42.6 ms42.6 ms
Legacy[dataset_10240/targets_2048]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
870.1 ms870 ms
sparse trie[init size 1000 | update size 1000 | num updates 3]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
15 ms15 ms
sequence hashing[100]
crates/trie/trie/benches/hash_post_state.rs::post_state::hash_post_state::Hash Post State
CodSpeed Performance Gauge
0%
256.9 ms256.8 ms
parallel hashing[100]
crates/trie/trie/benches/hash_post_state.rs::post_state::hash_post_state::Hash Post State
CodSpeed Performance Gauge
0%
256.9 ms256.9 ms
V2[dataset_1024/targets_1]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
10.5 ms10.5 ms
validate_blob | num blobs: 6 | ValidateBlob
crates/primitives/benches/validate_blob_tx.rs::validate_blob::blob_validation::Blob Transaction KZG validation
CodSpeed Performance Gauge
0%
154.6 µs154.6 µs
receipts root | size: 100 | HashBuilder
crates/trie/trie/benches/trie_root.rs::benches::trie_root_benchmark::Receipts root calculation
CodSpeed Performance Gauge
0%
936.8 µs936.8 µs
sequence hashing[1000]
crates/trie/trie/benches/hash_post_state.rs::post_state::hash_post_state::Hash Post State
CodSpeed Performance Gauge
0%
2.6 s2.6 s
sparse trie[init size 10000 | update size 100 | num updates 5]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
11.1 ms11.1 ms
prefix set | size: 100 | `Vec` with custom cursor lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
0%
16.7 µs16.7 µs
prefix set | size: 10 | `Vec` with custom cursor lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
0%
3.3 µs3.3 µs
prefix set | size: 100 | `BTreeSet` with `Iterator:any` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
0%
149.3 µs149.3 µs
ordered_trie_root
crates/trie/trie/benches/trie_root.rs::benches::trie_root_benchmark::Receipts root calculation::receipts root | size: 1000 | triehash
CodSpeed Performance Gauge
0%
11.8 ms11.8 ms
collect_twice[1000]
crates/trie/common/benches/hashed_state.rs::benches::bench_from_parallel_iterator::HashedPostState::from_par_iter
CodSpeed Performance Gauge
0%
725.6 µs725.7 µs
validate_blob | num blobs: 4 | ValidateBlob
crates/primitives/benches/validate_blob_tx.rs::validate_blob::blob_validation::Blob Transaction KZG validation
CodSpeed Performance Gauge
0%
151.8 µs151.8 µs
V2[dataset_1024/targets_512]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
11 ms11 ms
sparse trie[init size 10000 | update size 100 | num updates 1]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
2.3 ms2.3 ms
V2[dataset_10240/targets_2048]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
639.9 ms639.9 ms
hash builder[init size 10000 | update size 100 | num updates 10]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
85.5 ms85.5 ms
prefix set | size: 1000 | `BTreeSet` with `Iterator:any` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
0%
14.9 ms14.9 ms
Legacy[dataset_1024/targets_64]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
11.4 ms11.4 ms
sparse trie[init size 10000 | update size 100 | num updates 10]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
22.1 ms22.1 ms
sparse trie[init size 10000 | update size 1000 | num updates 10]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
111.6 ms111.7 ms
ordered_trie_root
crates/trie/trie/benches/trie_root.rs::benches::trie_root_benchmark::Receipts root calculation::receipts root | size: 100 | triehash
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
receipts root | size: 1000 | HashBuilder
crates/trie/trie/benches/trie_root.rs::benches::trie_root_benchmark::Receipts root calculation
CodSpeed Performance Gauge
0%
9.1 ms9.1 ms
fold_reduce[10000]
crates/trie/common/benches/hashed_state.rs::benches::bench_from_parallel_iterator::HashedPostState::from_par_iter
CodSpeed Performance Gauge
0%
12.1 ms12.1 ms
ordered_trie_root
crates/trie/trie/benches/trie_root.rs::benches::trie_root_benchmark::Receipts root calculation::receipts root | size: 10 | triehash
CodSpeed Performance Gauge
0%
132 µs132.1 µs
V2[dataset_1024/targets_128]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
10.7 ms10.7 ms
Legacy[dataset_128/targets_2048]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
Legacy[dataset_1024/targets_128]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
12.2 ms12.2 ms
fold_reduce[1000]
crates/trie/common/benches/hashed_state.rs::benches::bench_from_parallel_iterator::HashedPostState::from_par_iter
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
parallel hashing[1000]
crates/trie/trie/benches/hash_post_state.rs::post_state::hash_post_state::Hash Post State
CodSpeed Performance Gauge
0%
2.6 s2.6 s
sparse trie[init size 1000 | update size 100 | num updates 3]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
3.3 ms3.3 ms
sparse trie[init size 1000 | update size 1000 | num updates 1]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
5.1 ms5.1 ms
sparse trie[init size 10000 | update size 100 | num updates 3]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
6.7 ms6.7 ms
Legacy[dataset_1024/targets_16]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
10.7 ms10.7 ms
hash builder[init size 1000 | update size 100 | num updates 5]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
12.4 ms12.4 ms
sparse trie[init size 10000 | update size 1000 | num updates 1]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
11.7 ms11.7 ms
hash builder[init size 10000 | update size 1000 | num updates 5]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
127.1 ms127.2 ms
sparse trie[init size 10000 | update size 1000 | num updates 5]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
56 ms56.1 ms
V2[dataset_1024/targets_16]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
10.5 ms10.6 ms
prefix set | size: 100 | `BTreeSet` with `BTreeSet:range` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
0%
40.1 µs40.2 µs
V2[dataset_1024/targets_64]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
10.6 ms10.6 ms
validate_blob | num blobs: 2 | ValidateBlob
crates/primitives/benches/validate_blob_tx.rs::validate_blob::blob_validation::Blob Transaction KZG validation
CodSpeed Performance Gauge
0%
149.6 µs149.8 µs
hash builder[init size 1000 | update size 100 | num updates 3]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
0%
7.4 ms7.5 ms
hash builder[1000]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves::calculate root from leaves
CodSpeed Performance Gauge
0%
4.5 ms4.5 ms
Legacy[dataset_1024/targets_2048]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
19.6 ms19.6 ms
V2[dataset_128/targets_1]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
0%
677.4 µs680.8 µs
hash builder[init size 1000 | update size 100 | num updates 1]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
CodSpeed Performance Gauge
-1%
2.5 ms2.5 ms
V2[dataset_128/targets_2048]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
-1%
1.1 ms1.2 ms
size 100000 | updated 0.1% | depth 4
crates/trie/sparse/benches/rlp_node.rs::rlp_node::update_rlp_node_level::update rlp node level
CodSpeed Performance Gauge
-1%
1.3 ms1.4 ms
prefix set | size: 10 | `BTreeSet` with `BTreeSet:range` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
-1%
5.1 µs5.1 µs
fold_reduce[100]
crates/trie/common/benches/hashed_state.rs::benches::bench_from_parallel_iterator::HashedPostState::from_par_iter
CodSpeed Performance Gauge
-2%
155 µs157.6 µs
V2[dataset_128/targets_512]
crates/trie/trie/benches/proof_v2.rs::proof_comparison::bench_proof_algos::Proof
CodSpeed Performance Gauge
-2%
836.9 µs857.3 µs
fold_reduce[50000]
crates/trie/common/benches/hashed_state.rs::benches::bench_from_parallel_iterator::HashedPostState::from_par_iter
CodSpeed Performance Gauge
-3%
71.4 ms73.4 ms
collect_twice[100]
crates/trie/common/benches/hashed_state.rs::benches::bench_from_parallel_iterator::HashedPostState::from_par_iter
CodSpeed Performance Gauge
-6%
83 µs88.4 µs

Commits

Click on a commit to change the comparison range
Base
main
3ca5cf4
+0.02%
docs(trie): fix doc drift after anchor_hash simplification Update documentation to reflect that anchor_hash is metadata only and does not affect overlay reuse decisions.
6a60626
2 days ago
by yongkangc
+0.2%
test(trie): add multi-ancestor overlay reuse test for anchor change Adds test that verifies a chain of 3 blocks with old anchor correctly reuses the cumulative overlay when a 4th block is added with a new anchor (simulating post-persist scenario).
efb9725
1 day ago
by yongkangc
-0.13%
cp,,emts
7889faf
1 day ago
by yongkangc
-0.11%
update
644f156
1 day ago
by yongkangc
+0.09%
perf(trie): use deep copy for overlay reuse to avoid Arc::make_mut clone Replace Arc::clone with explicit deep copy (Arc::new + clone) when reusing parent's overlay. This ensures strong_count = 1, so Arc::make_mut in the extend step is a no-op instead of triggering a full overlay clone. Before: Arc::clone created shared ownership (strong_count = 2), causing Arc::make_mut to clone the entire overlay - effectively doubling the work. After: Deep copy upfront means Arc::make_mut sees strong_count = 1 and returns &mut directly without cloning. This also fixes memory retention with delayed persistence (500ms wait): deep copy breaks the Arc chain so each overlay has independent lifetime.
85c7373
1 day ago
by yongkangc
-0.01%
cleanup comment
5cb709f
1 day ago
by yongkangc
+0.02%
fix(trie): clarify overlay reuse logic based on anchor_hash Updated comments and tests to reflect that the overlay data is dependent on the anchor_hash. The overlay can only be reused if it was built on the same anchor; otherwise, it must be rebuilt from ancestors. This change ensures correct state application and improves understanding of the overlay reuse mechanism.
8a2eb30
1 day ago
by yongkangc
-0.04%
feat: pre-compute trie overlay at persist time with non-blocking rebuild After persistence, the anchor hash changes and the cached overlay cannot be reused. Previously, the first block after persist paid O(N) rebuild cost on the critical validation path, causing p99 latency spikes. This change spawns a background task after persist completes that: 1. Collects all remaining in-memory blocks 2. Builds a cumulative overlay from their already-computed trie data 3. Updates the tip block's cached overlay with the new anchor Key design decisions: - Uses non-blocking try_get()/try_trie_data() to avoid competing with block validation - if any trie data is still pending, the task bails out early - The next block validation will trigger synchronous rebuild as fallback - Since persist runs every ~500ms and blocks arrive every ~12s, the background task almost always succeeds before the next block needs the overlay New APIs: - DeferredTrieData::try_get() - returns None if pending (never computes) - DeferredTrieData::update_cached_overlay() - updates anchor and overlay in-place - ExecutedBlock::try_trie_data() - non-blocking wrapper around try_get()
190477d
4 hours ago
by yongkangc
© 2026 CodSpeed Technology
Home Terms Privacy Docs