-
Notifications
You must be signed in to change notification settings - Fork 1.6k
perf(trie): parallel rlp node updates in sparse trie #13251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
75d8c87
to
a50b561
Compare
targets | ||
.into_par_iter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feature gate behind rayon
or parallel
or smth pls
bee10a4
to
2b81abe
Compare
CodSpeed Performance ReportMerging #13251 will degrade performances by 11.01%Comparing Summary
Benchmarks breakdown
|
crates/trie/sparse/src/trie.rs
Outdated
&self, | ||
prefix_set: &mut PrefixSet, | ||
depth: usize, | ||
) -> (Vec<(usize, Nibbles)>, PrefixSetMut) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with these changes the type returned doesn't match the method name. It is also quite complex, looking at the type itself it is not obvious for instance what the usize is, wdyt?
52bc052
to
513eab7
Compare
This PR is outdated, will be revised later. |
Makes the
RevealedSparseTrie::rlp_node
take a non-mutable reference toself
and return the list of updates that are need to be applied to the trie nodes. This allows us to run multiplerlp_node
in parallel in theRevealedSparseTrie::update_rlp_node_level
, because we gather the nodes at the provided level and calculate their hashes independently from each other.