Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

core/rawdb: reduce allocations in *key methods #33006

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

Open
MariusVanDerWijden wants to merge 1 commit into ethereum:master
base: master
Choose a base branch
Loading
from MariusVanDerWijden:rawdb-reduce-allocs-2

Conversation

@MariusVanDerWijden
Copy link
Member

@MariusVanDerWijden MariusVanDerWijden commented Oct 23, 2025

Reduces the allocation in certain methods. This will reduce overall allocations by 5-10% during snap sync.
The issue is that the compiler does not know that the keys are const, thus it can't allocate the keys on the stack.
All methods that take in var length parameters, e.g trienodeHistoryIndexKey can't be optimized like this, since the compiler does not know that path is only of a certain size

Copy link
Member Author

Pls don't merge yet, I have some more improvements in the pipeline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rjl493456442 rjl493456442 Awaiting requested review from rjl493456442 rjl493456442 is a code owner

1 more reviewer

@7fantasy7 7fantasy7 7fantasy7 approved these changes

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /