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

Use SmallVec in builder arena to avoid heap allocation for single-segment case #364

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marmeladema
Copy link
Contributor

No description provided.

@dwrensha
Copy link
Member

Does this actually help performance? Last time I tried it seemed to make things a bit slower.

@marmeladema
Copy link
Contributor Author

I never meant to close this 😑

@marmeladema marmeladema reopened this Jan 16, 2023
@marmeladema
Copy link
Contributor Author

I haven't run the benchmarks yet, and to be honest, I don't care much about this because I have another change I want to propose on top of the refactor build arena PR where I make a builder re-usable.

@dwrensha
Copy link
Member

where I make a builder re-usable.

What kind of builder? A message::Builder? Can you explain more about your plan?

Does the existing message::ScratchSpaceHeapAllocator work for your use case?

@marmeladema
Copy link
Contributor Author

The allocator is only part of the solution. I want to re-use the vec of segments in the builder arena.

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