mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
perf: trie micro optimizations (#13282)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#![allow(missing_docs, unreachable_pub)]
|
||||
|
||||
use alloy_primitives::{map::HashMap, B256, U256};
|
||||
use alloy_primitives::{map::B256HashMap, B256, U256};
|
||||
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
|
||||
use itertools::Itertools;
|
||||
use proptest::{prelude::*, strategy::ValueTree, test_runner::TestRunner};
|
||||
@ -193,7 +193,7 @@ pub fn calculate_root_from_leaves_repeated(c: &mut Criterion) {
|
||||
}
|
||||
}
|
||||
|
||||
fn generate_test_data(size: usize) -> HashMap<B256, U256> {
|
||||
fn generate_test_data(size: usize) -> B256HashMap<U256> {
|
||||
let mut runner = TestRunner::new(ProptestConfig::default());
|
||||
proptest::collection::hash_map(any::<B256>(), any::<U256>(), size)
|
||||
.new_tree(&mut runner)
|
||||
|
||||
Reference in New Issue
Block a user