Skip to content

Eliminate redundant linear slot scan in DecompressAndInsertKey and DecompressAndInsertMapPair. - #3537

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1016190808
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1016190808

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Eliminate redundant linear slot scan in DecompressAndInsertKey and DecompressAndInsertMapPair.
At every call site of InsertIntoLeaf, TryRebalanceLeafOnInsert (Tier 2.5 sibling rebalancing), and SplitLeafNode (Tier 3 leaf splitting), the target insertion index 'slot' within the leaf has already been computed by LeafContains or CheckInsertHint.

We can pass 'slot' through these functions into DecompressAndInsert* fxns, removing the redundant while (slot < count && out_keys[slot] < new_key) scalar scan

…compressAndInsertMapPair.

At every call site of InsertIntoLeaf, TryRebalanceLeafOnInsert (Tier 2.5 sibling rebalancing), and SplitLeafNode (Tier 3 leaf splitting), the target insertion index 'slot' within the leaf has already been computed by LeafContains or CheckInsertHint.

We can pass 'slot' through these functions into DecompressAndInsert* fxns, removing the redundant while (slot < count && out_keys[slot] < new_key) scalar scan

PiperOrigin-RevId: 1016190808

This branch has not been deployed

No deployments
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.

1 participant