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): use smallvec as the Nibbles representation #5641

Merged
merged 13 commits into from
Dec 1, 2023

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Nov 30, 2023

Follow-up to #5631

Use SmallVec<[u8; 64]> as the Nibbles internal representation to allow storing bytes inline, rather than on the heap. SmallVec falls back to storing on the heap when the stack capacity would overflow.

Also optimize packing to account for this fact.

image

@DaniPopes DaniPopes changed the title Dani/smol nibbles perf(trie): use smallvec in Nibbles representation Nov 30, 2023
@DaniPopes DaniPopes marked this pull request as ready for review November 30, 2023 20:58
@DaniPopes DaniPopes changed the title perf(trie): use smallvec in Nibbles representation perf(trie): use smallvec as the Nibbles representation Nov 30, 2023
@DaniPopes DaniPopes requested a review from mattsse December 1, 2023 00:28
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing,
pending @rkrasiuk

@DaniPopes DaniPopes enabled auto-merge December 1, 2023 22:40
@DaniPopes DaniPopes added this pull request to the merge queue Dec 1, 2023
Merged via the queue into main with commit 542639c Dec 1, 2023
@DaniPopes DaniPopes deleted the dani/smol-nibbles branch December 1, 2023 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants