Prepare for expanding the number of inner node types#64
Merged
Conversation
Owner
declanvk
commented
Sep 23, 2025
- Add new crate for analyzing key distributions
- Move leaf node to own module
- Rename inner node types
- Move "read full prefix" out of header module
**Description**
Add `blart-analysis` crate with some logic for analyzing key
distributions and optimizing inner node width assignments.
**Motivation**
I'd like to test out possible performance gains when optimizing the
tree representation for specific key distributions.
**Testing Done**
Unit tests, ran:
```bash
cargo run --release --\
--timing \
/home/declan/repos/github/learnedsystems/SOSD/data/books_200M_uint64
```
**Motivation** The `representation.rs` file is pretty large and it is difficult to read at times, this change makes that slightly better.
**Description** - `InnerNodeCompressed` -> `InnerNodeSorted` - `InnerNode48` -> `InnerNodeIndirect` - `InnerNode256` -> `InnerNodeDirect` - Also make `InnerNode48` generic over number of children **Motivation** Renamed the inner node types to focus on their method of lookup, as opposed to the number of child nodes they could contain. Also made `InnerNodeIndirect` to be generic over the number of children so it could be expanded in the future. **Testing Done** `./scripts/full-test.sh nightly`
**Description** Also simplify some of `ltrim_by_with_leaf` code since it was redundant. **Motivation** The `inner_read_full_prefix` function didn't really belong in the header module, since it was mostly concerned with traversing the tree and reading from a descendant leaf node. **Testing Done** `./scripts/full-test.sh nightly`
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.