perf(engine): parallel storage roots (#10666)

This commit is contained in:
Roman Krasiuk
2024-09-12 15:12:05 +02:00
committed by GitHub
parent b85a4e8a70
commit acdb7b7e2e
9 changed files with 178 additions and 36 deletions

View File

@ -62,7 +62,14 @@ pub fn calculate_state_root(c: &mut Criterion) {
// parallel root
group.bench_function(BenchmarkId::new("parallel root", size), |b| {
b.to_async(&runtime).iter_with_setup(
|| ParallelStateRoot::new(view.clone(), updated_state.clone()),
|| {
ParallelStateRoot::new(
view.clone(),
Default::default(),
updated_state.clone(),
updated_state.construct_prefix_sets().freeze(),
)
},
|calculator| async { calculator.incremental_root() },
);
});