capnproto-rust
capnproto-rust copied to clipboard
Use `SmallVec` in builder arena to avoid heap allocation for single-segment case
Does this actually help performance? Last time I tried it seemed to make things a bit slower.
I never meant to close this 😑
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.
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?
The allocator is only part of the solution. I want to re-use the vec of segments in the builder arena.