6× faster binary search: from compiled code to mechanical sympathy
enz
15 points
3 comments
July 12, 2026
Related Discussions
Found 5 related stories in 90.9ms across 9,716 title embeddings via pgvector HNSW
- Static search trees: 40x faster than binary search (2024) lalitmaganti · 82 pts · July 17, 2026 · 59% similar
- Python sets and dictionaries can have quadratic-time performance ibobev · 12 pts · September 08, 2026 · 47% similar
- Pg_vectorsearch: An index that is faster than pgvector's IVFFlat and HNSW jascha_eng · 200 pts · October 14, 2026 · 45% similar
- Show HN: I've built a words game based on binary search ludovicianul · 47 pts · July 16, 2026 · 44% similar
- Auto-research with codex: How I achieved a 232x Faster Kernel tosh · 412 pts · August 15, 2026 · 43% similar
Discussion Highlights (2 comments)
pillmillipedes
I think putting the buckets in eytzinger layout might help with cache locality here? though on the other hand they might all fit into cache anyways.. I'd also want to try interpolation search for this (not necessarily linear interpolation since we're doing floats) - you can take much better guesses than "it's in the middle somewhere" by not having to look at the data through a 1-bit-wide pinhole as comparison algorithms do.
moi2388
“ How do you speed up computational Python code? A common, and useful, starting point is” A better starting point is: use a better language. Python is terrible and unbearably slow. If you need anything serious or performant, switch to something else.