Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TreeNodeDynamicSize impl part 4 - splitLeaf
Add possibility to defragment a leaf. When removing keys we only mark them as dead. If we can avoid splitting a leaf during insert by removing those dead keys, defragmenting the leaf, we will do that instead. Defragmenting is a no-op for fixed size implementation. Explicit changes: - (new method) TreeNode.defragmentLeaf - TreeNode.doSplitLeaf takes responsibility of finding 'middle' - TreeNode.leafOverflow return Overflow.{YES,NO,NEED_DEFRAG} instead of boolean - PageAwareByteArrayCursor does not throw when writing zero bytes. - (new method) PrimitiveIntStack.peek()
- Loading branch information
Showing
12 changed files
with
670 additions
and
123 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.