You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR introduces batch writing of BTreeMap node children addresses to improve performance.
This PR follows the idea from #364 to batch individual writes.
Although there are no significant changes overall, the majority of cases show slight improvements (p25–p75: approx -0.07%), with: worst +0.27%, median 0.00%, best -1.28%.
btreemap
instructions:
status: No significant changes 👍
counts: [total 285 | regressed 0 | improved 0 | new 0 | unchanged 285]
change: [max +1.43M | p75 0 | median 0 | p25 -637.40K | min -10.48M]
change %: [max +0.27% | p75 0.00% | median 0.00% | p25 -0.07% | min -1.28%]
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a batched write for BTreeMap node children addresses to reduce per-child writes and updates benchmark results to reflect instruction count changes.
Replace per-child write_u64 calls with a single writer.write of a concatenated byte buffer
Update benchmark YAMLs with new instruction counts after performance change
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File
Description
src/btreemap/node/v2.rs
Implement batch writing of children addresses
benchmarks/compare/*.yml
Updated instruction counts for write_chunks bench
benchmarks/btreemap/*.yml
Updated instruction counts for btreemap benches
benchmarks/btreeset/*.yml
Updated instruction counts for btreeset benches
Comments suppressed due to low confidence (1)
src/btreemap/node/v2.rs:262
[nitpick] Allocating a new Vec<u8> on each call may add overhead; consider reusing a shared buffer or a stack-allocated array if child count is bounded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces batch writing of BTreeMap node children addresses to improve performance.
This PR follows the idea from #364 to batch individual writes.
Although there are no significant changes overall, the majority of cases show slight improvements (p25–p75: approx -0.07%), with: worst +0.27%, median 0.00%, best -1.28%.
btreemap