paradigmxyz
reth
BlogDocsChangelog

refactor: eliminate redundant allocation in precompile cache example

#18886
Comparing
sky-coderay:refactor/precompile-example-efficiency
(
5a3b106
) with
main
(
83cec37
)
CodSpeed Performance Gauge
0%
Untouched
77

Benchmarks

Passed

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
+5%
9.2 ms8.7 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
+4%
27.1 ms26.1 ms
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
+2%
3.1 µs3.1 µ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
+2%
7.3 ms7.2 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
+1%
12.1 ms11.9 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
+1%
249 ms246 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
prefix set | size: 10 | `Vec` with binary search lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
+1%
3.7 µs3.7 µs
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.6 ms5.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
+1%
16.9 ms16.7 ms
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
+1%
28 ms27.8 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.9 ms85.5 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%
55.8 ms55.6 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.1 µs16.1 µs
sparse trie[5000]
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves::calculate root from leaves
CodSpeed Performance Gauge
0%
28.8 ms28.7 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%
155.1 µs154.8 µs
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
prefix set | size: 100 | `Vec` with binary search lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
0%
19.1 µs19 µs
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.5 ms111.4 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
0%
43.8 ms43.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
0%
11.2 ms11.2 ms
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.1 µs150.9 µs
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
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.7 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.7 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
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%
131.9 µs131.8 µs
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%
149.9 µs149.8 µs
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.2 µs40.2 µs
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
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.4 µs149.3 µ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
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.9 µs149.9 µs
recover ECDSA
crates/primitives/benches/recover_ecdsa_crit.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
206.4 µs206.4 µ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%
138.4 µs138.3 µs
prefix set | size: 1000 | `Vec` with binary search lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups
CodSpeed Performance Gauge
0%
198.3 µs198.3 µs
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%
21.9 ms21.9 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
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.6 ms11.6 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.3 ms
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
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
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
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
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%
152 µs152 µ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
receipts root | size: 100 | HashBuilder
crates/trie/trie/benches/trie_root.rs::benches::trie_root_benchmark::Receipts root calculation
CodSpeed Performance Gauge
0%
937.4 µs937.8 µs
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%
465.5 µs465.7 µs
receipts root | size: 10 | HashBuilder
crates/trie/trie/benches/trie_root.rs::benches::trie_root_benchmark::Receipts root calculation
CodSpeed Performance Gauge
0%
112.1 µs112.2 µs
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
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
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
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
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.2 ms15.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
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%
50.3 ms50.4 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%
25.2 ms25.3 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.3 µs153.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.8 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%
123.8 ms124.1 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%
23.8 ms23.9 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.4 ms24.4 ms
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
0%
2.4 ms2.4 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.2 ms5.2 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.4 ms24.5 ms
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.2 ms24.3 ms
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.3 ms21.5 ms
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
-1%
1 ms1.1 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.3 ms3.4 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.5 ms3.6 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.5 ms3.6 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.8 µ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%
25.8 ms26.1 ms
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
-1%
8.1 ms8.2 ms
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
-2%
75.1 ms76.3 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
-2%
2.4 ms2.4 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
-3%
1.3 ms1.3 ms

Commits

Click on a commit to change the comparison range
Base
main
83cec37
+0.07%
refactor: eliminate redundant allocation in precompile cache example
5a3b106
2 hours ago
by sky-coderay
© 2025 CodSpeed Technology
Home Terms Privacy Docs