Back to directory

ChaosTree

A zero-dependency Java library of sorted Set and Map implementations, including AVL trees, red-black trees, B-trees and B+ trees, built for cache locality and compliant with JDK 21's SequencedCollection interfaces.

ChaosTree

ChaosTree implements Java's NavigableMap and NavigableSet as AVL trees, red-black trees, B-trees and B+ trees, choosing between two engines depending on the workload: an N-ary family (BTree, BPlusTree) for high read throughput and large range scans, packing nodes into pre-allocated arrays for cache locality, and a binary family (AVL, RBT) for fast point queries and everyday storage.

Bulk loading is O(N) through buildFromSorted and importFlatMatrix, with a tunable fill factor. The library is fully compliant with JDK 21's SequencedCollection, SequencedSet and SequencedMap interfaces, though addFirst() and addLast() are unsupported and fail fast, since these are strictly sorted structures. It supports serialization and cloning, with O(N) bulk-load restoration on deserialize.

Correctness is checked against more than 214,000 generated Guava Testlib cases for exact TreeMap/TreeSet semantics, plus property-based fuzzing with Jqwik against java.util.TreeMap as a reference. It has no dependencies and is available through Maven or Gradle.

More in Libraries

See all 292
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • TradeCanvas

    bonguynvan.github.io

    A zero-dependency canvas charting engine for building TradingView-style trading charts in JavaScript, with 66 technical indicators, 24 drawing tools, 17 chart types, and real-time streaming.

  • 3d retro graphics

    3d-retro.com

    A free, CC0-licensed library of copy-paste retro 3D and demoscene graphics effects, such as plasma, raytracing, and voxel terrain, runnable as WebGL 1 or plain 2D canvas.