~/talk

Rethinking Binary Search: Improving on a Classic with AI Assistance

slides:none on file

Proposes a concrete rewrite of STL binary-search primitives: implements a bounds-leaning search (cut 1/2 then 1/4) plus a left-leaning upper bound and optional galloping, generates C++ code, math and empirical benchmarks with ChatGPT assistance, and plots with WolframAlpha. Shows savings of about 0.5–2 comparisons on average (≈5–10% speedup at N≈1,000,000), small worst-case regressions, and clear wins when many queries fall outside the stored range; all changes are measured, not just hypothetical.

AI-written summary · about

  1. 0:00Introduction
  2. 11:48Classic binary search
  3. 22:03Expected comparisons
  4. 29:13Out-of-bounds searches
  5. 37:04Extreme out-of-bounds optimization
  6. 42:04Bounds-leaning binary search
  7. 45:38Improving equal range search
  8. 55:11Summary and AI assistance
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.