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 implements lazy sibling loading in BTreeMap::remove to avoid redundant node reads.
In remove Case 3 (child at minimum), both left and right siblings were always loaded from stable memory even though only one may be needed. This change loads the left sibling first and skips loading the right sibling entirely when the left can donate an entry. Saves one node load in ~50% of rebalancing cases.
canbench 🏋 (dir: ./benchmarks/vec) 8de9da0 2026-04-03 08:23:55 UTC
✅ ./benchmarks/vec/canbench_results.yml is up to date
📦 canbench_results_vec.csv available in artifacts
---------------------------------------------------
Summary:
instructions:
status: No significant changes 👍
counts: [total 16 | regressed 0 | improved 0 | new 0 | unchanged 16]
change: [max 0 | p75 0 | median 0 | p25 0 | min 0]
change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]
heap_increase:
status: No significant changes 👍
counts: [total 16 | regressed 0 | improved 0 | new 0 | unchanged 16]
change: [max 0 | p75 0 | median 0 | p25 0 | min 0]
change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]
stable_memory_increase:
status: No significant changes 👍
counts: [total 16 | regressed 0 | improved 0 | new 0 | unchanged 16]
change: [max 0 | p75 0 | median 0 | p25 0 | min 0]
change %: [max 0.00% | p75 0.00% | median 0.00% | p25 0.00% | min 0.00%]
---------------------------------------------------
CSV results saved to canbench_results.csv
maksymar
changed the title
perf: lazy simbling loading in BTreeMap::remove
perf: lazy sibling loading in BTreeMap::remove
Apr 3, 2026
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 implements lazy sibling loading in
BTreeMap::removeto avoid redundant node reads.In remove Case 3 (child at minimum), both left and right siblings were always loaded from stable memory even though only one may be needed. This change loads the left sibling first and skips loading the right sibling entirely when the left can donate an entry. Saves one node load in ~50% of rebalancing cases.