Skip to content

Conversation

@BCathcart
Copy link
Collaborator

This PR replaces the rough custom RadixTree with Rax in our text index structure. RadixTree was naturally becoming more and more aligned with Rax, but without the space efficiency implemented yet. It makes more sense to switch to the well-used Rax and modify it as needed. Everything in this PR was done with some care except the PathIterator which I intend to redo with a follow-up in a week or so. Please ignore it. There are also opportunities for follow-up optimization:

  • raxMutate uses the existing APIs to find the existing target and then update the target if needed with two traversals. It shouldn't be hard to only traverse once in every case.
  • Use SIMD to compare outgoing edges to the search character while traversing (motivated by ART paper)
  • Optimize the iterator. There were some lessons from implementing the RadixTree iterator I think we could use to get a small efficiency gain in the Rax iterator.

BCathcart and others added 9 commits January 10, 2026 02:36
Signed-off-by: Brennan Cathcart <[email protected]>
Signed-off-by: Brennan Cathcart <[email protected]>
Signed-off-by: Brennan Cathcart <[email protected]>
Signed-off-by: Brennan Cathcart <[email protected]>
Signed-off-by: Brennan Cathcart <[email protected]>
Signed-off-by: Brennan Cathcart <[email protected]>
@BCathcart BCathcart mentioned this pull request Jan 13, 2026
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