Show HN: ChaosTree – A zero-dependency Java tree library (AVL,RBT,B-Tree,B+Tree)
ChaosTree is a new open-source Java library providing high-performance implementations of various search-tree data structures like AVL, Red-Black, and B-Trees. It is designed for cache-locality and full compatibility with modern JDK 21 collection interfaces.
Why it matters
Efficient data structures are fundamental to software performance, and this library offers developers optimized tools for handling sorted sets and maps in Java applications.
ChaosTree is a Java Sorted Set/Map library built around multiple search-tree data structures, including AVL Trees, Red-Black Trees, B-Trees, and B+ Trees.
The library provides both Set and Map implementations , with APIs designed around the semantics of the JDK's NavigableSet , NavigableMap , SequencedSet , and SequencedMap contracts.
In addition to the standard collection APIs, ChaosTree provides specialized construction APIs for users who want direct control over the initial structure of N-ary trees, Do read
These APIs allow users to control the target node occupancy through a configurable factor in the supported range [0.5, 1.0] , while maintaining the structural invariants required by the underlying B-Tree/B+Tree design.
ChaosTree is validated through multiple layers of testing:
The structural tests inspect the internal tree representation rather than relying solely on externally observable behavior. This provides an additional layer of validation for node occupancy, ordering, topology, and balancing invariants.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in