.. /index

Algorithmica S+ Tree

Algorithmica S+ Tree

Sergey Slotin's reference SIMD B-tree, presented in Algorithms for Modern Hardware. Achieves 7–18× speedup over std::set on lower_bound and 3–7× over Abseil btree_set on integer key lookups, in under 150 lines of C++. It is the canonical demonstration that the gap between mainstream ordered maps and what hardware allows is dominated by cache and SIMD, not algorithm.

What makes it fast

The design only handles static, integer-key sets — no inserts after construction. That is the deliberate trade. By giving up dynamic updates the implementation gains the structural assumptions that make the inner loop branchless.

Where it sits

Tier 1 of the ordered-map hierarchy — alongside the more recent bs-tree (AVX-512, gapped nodes for branchless updates) and fb-plus-tree (variable-length keys with SIMD prefix matching). For a production-ready drop-in, Abseil btree_map is the right pick; for the absolute ceiling on a static integer index, the S+ tree is the reference.

The same techniques — SIMD parallel scanning, contiguous layout, branch elimination — appear in swiss-table (hash maps), adaptive-radix-tree Node16 (tries), and blocked Bloom filters. The S+ tree is the cleanest demonstration of the recipe applied to ordered search.

Linked from

Sources