July 17, 2026

Search party turns into fight club

Static search trees: 40x faster than binary search (2024)

Coder says he crushed search speed, and the comments instantly turned into a nerd cage match

TLDR: A programmer says a custom search setup can beat ordinary binary search by as much as 40 times on sorted data, which could matter anywhere huge lists need lightning-fast lookups. Commenters immediately split between impressed applause and classic nerd nitpicking over whether the idea is truly new or just a clever remix of older tricks.

A marathon blog post claiming a new way to search sorted numbers can be up to 40 times faster than classic binary search should have been a quiet performance win. Instead, the community treated it like the tech version of dropping a bomb in the group chat. The author walks through an ultra-detailed experiment in squeezing every last drop of speed from a read-only lookup structure, layering on tricks like smarter memory layouts, batching, and low-level tuning. For normal humans: it’s about finding items in a giant sorted list much, much faster.

But the real show was the reaction. One corner of the crowd was delighted, with simple gratitude like “Thanks for sharing this” from jas-, while others immediately jumped into “hold on, doesn’t this already sound like something else?” territory. stevefan1999 name-dropped the famously intimidating van Emde Boas tree almost on instinct, basically summoning the ancient spirits of computer science into the thread. Then kazinator brought the reality check: isn’t part of this layout idea basically the same old trick used in binary heaps?

That set the mood fast: half awe, half “I’ve seen this movie before.” The humor here is peak programmer energy—people cannot simply enjoy a big number like 40x without immediately trying to trace its family tree, compare it to old textbook ideas, and argue over whether this is genius, remix, or both. In other words, the algorithm was fast, but the comments were faster

Key Points

  • The article implements a static search tree for searching sorted 32-bit unsigned integers and uses an earlier Algorithmica S-tree design as its starting point.
  • It presents a detailed optimization walkthrough covering `find`, vectorization, popcount, manual SIMD, batching, prefetching, and pointer arithmetic.
  • The article highlights batching as a major added optimization for improving throughput.
  • It examines alternative tree and memory layouts, including left-tree designs, node sizing, compact subtrees, overlapping trees, and prefix partitioning.
  • The author provides public source code, benchmarks, and plotting code in a GitHub repository and concludes with multi-threaded comparisons and future-work ideas.

Hottest takes

"My first instinct is" — stevefan1999
"This is exactly what is done in good old binary heaps" — kazinator
"Thanks for sharing this" — jas-
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.