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: Misc perf improvements #30

Merged
merged 6 commits into from
May 7, 2024
Merged

Conversation

cchudant
Copy link
Member

@cchudant cchudant commented May 3, 2024

Hi,
I have been working a bit on perf, and following discussions with @AurelienFT, I think it's better to split it into separate prs

This one does not change any of the public api and I think should be easy and uncontroversial to merge

in total, this gives about a 20% improvement on the insert 40k random keys into a contract.
The benches use HashMap db and they are handcrafted, they may not accurately translate to these numbers in the real world - I am simply just following what the vtune profiler tells me is bad

For the other prs: the main one I really want adds a bonsai trie many_insert, which does GETs and tree traversal in parallel but I've had some complications as Rocksdb transaction object isnt Sync, which means I can't just reuse the existing transactional state merge api without having to change it quite a bit
I think I have come up with a better way though, so I'll drop the PR asap and we'll see then if it's nice enough

The other one is about switching all keys to smallvec storage, it kind of changes the api a bit at some places

Copy link
Collaborator

@AurelienFT AurelienFT left a comment

Choose a reason for hiding this comment

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

Thank you for the very good work on this PR that improve readability and performances.

@AurelienFT AurelienFT merged commit 13ea07a into madara-alliance:oss May 7, 2024
6 checks passed
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.

2 participants