Skip to content
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

perf(trie): cache prefix set lookups in sparse trie #12088

Merged
merged 5 commits into from
Oct 28, 2024

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Oct 25, 2024

We can save on a PrefixSet::contains lookup for those nodes that were already checked. It can happen when checking the children of a branch node and then checking the branch node again, and when checking the extension node and then checking it again.

@shekhirin shekhirin added C-perf A change motivated by improving speed, memory usage or disk footprint A-trie Related to Merkle Patricia Trie implementation labels Oct 25, 2024
@shekhirin shekhirin marked this pull request as ready for review October 26, 2024 11:24
@shekhirin shekhirin enabled auto-merge October 28, 2024 10:50
@shekhirin shekhirin disabled auto-merge October 28, 2024 11:49
@shekhirin shekhirin enabled auto-merge October 28, 2024 11:50
@shekhirin shekhirin disabled auto-merge October 28, 2024 12:27
@shekhirin shekhirin added this pull request to the merge queue Oct 28, 2024
Merged via the queue into main with commit 1f1c68d Oct 28, 2024
38 of 40 checks passed
@shekhirin shekhirin deleted the alexey/sparse-trie-cache-prefix-set-lookup branch October 28, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trie Related to Merkle Patricia Trie implementation C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants