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

core/state: small trie prefetcher nits #28183

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

aaronbuchwald
Copy link
Contributor

This PR adds a comment to the trie prefetcher fetches field to make it clear when it will be populated (I found this non-obvious when reading through the code) and updates trieID to allocate a slice up front and copy in rather than using append.

Just small nits I found while reviewing the code, hope it's helpful 🫡

@MariusVanDerWijden
Copy link
Member

MariusVanDerWijden commented Sep 25, 2023

Master:
// BenchmarkTrieDB1-24 18177433 89.72 ns/op 128 B/op 2 allocs/op
This PR:
BenchmarkTrieDB2-24 42754866 46.21 ns/op 64 B/op 1 allocs/op

@fjl fjl changed the title Small trie prefetcher nits core/state: small trie prefetcher nits Sep 25, 2023
@aaronbuchwald
Copy link
Contributor Author

Master: // BenchmarkTrieDB1-24 18177433 89.72 ns/op 128 B/op 2 allocs/op This PR: BenchmarkTrieDB2-24 42754866 46.21 ns/op 64 B/op 1 allocs/op

Nice, next time I get the chance will try to look for benchmarks to run and include in the PR description.

@karalabe karalabe added this to the 1.13.3 milestone Sep 29, 2023
@karalabe karalabe merged commit c5ff839 into ethereum:master Sep 29, 2023
2 checks passed
hyunchel pushed a commit to hyunchel/go-ethereum that referenced this pull request Oct 6, 2023
tyler-smith pushed a commit to blocknative/go-ethereum that referenced this pull request Oct 12, 2023
tyler-smith pushed a commit to blocknative/go-ethereum that referenced this pull request Oct 16, 2023
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
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.

4 participants