Story

On air. The free wire runs 15 minutes behind live. See pricing

World, crypto, finance and tech news, scored for impact.

TechHacker NewsFiled 32 h ago

Swapping Jolt's sorted collections to a B+tree

Open the sourceReported by Hacker News, yogthos.net, 24 November 2026

Not investment advice. Muhabbit scores how much a story may matter, not which way to trade.

Jolt has replaced the red-black tree backing its sorted-map and sorted-set collections, along with its java.util.TreeMap and TreeSet shims, with a persistent B+tree, cutting peak memory by 40% while speeding up most operations at every size. The prior implementation stored each entry in a five-slot Scheme vector costing 48 bytes of metadata per entry, and a 4-million-entry map required a tree roughly 22 levels deep, producing scattered heap accesses and cache misses on lookups and writes. The B+tree packs up to 16 entries per leaf and 32 children per inner node into single contiguous Scheme vectors, reducing that same tree to about 5 levels and metadata to 17 bytes per entry in the common case, with 34 bytes as the worst case. Writes still copy the root-to-change path, but now at roughly a quarter of the prior work and in block copies rather than many small allocations. The change matters because it lowers memory overhead and improves lookup and write performance for Jolt's ordered collections without altering their persistent semantics. Next, watch the published benchmarks for operation-level results across sizes and how the append-packing optimization holds up under mixed workloads.

Muhabbit's AI wrote this summary in its own words from Hacker News's report. It can get details wrong, so check the source.

Named in this story

Jolt, Clojure, PersistentTreeMap, java.util.TreeMap, java.util.TreeSet