Skip to content

12. Specialized Search and Sorted-Order Procedures

Cache-efficient and hardware-tuned search: branchless binary search, Eytzinger and vEB layouts, learned indexes, SIMD search, and galloping intersection.

indexslugname
336exponential-backoff-searchExponential Backoff Search
337finger-searchFinger Search
338interpolation-sequential-searchInterpolation Sequential Search
339learned-index-searchLearned Index Search
340recursive-model-index-searchRecursive Model Index Search
341branchless-binary-searchBranchless Binary Search
342eytzinger-layout-searchEytzinger Layout Search
343van-emde-boas-layout-searchVan Emde Boas Layout Search
344cache-aware-binary-searchCache Aware Binary Search
345branchless-lower-boundBranchless Lower Bound
346simd-linear-searchSIMD Linear Search
347simd-binary-searchSIMD Binary Search
348interpolation-search-with-fallbackInterpolation Search with Fallback
349galloping-intersection-searchGalloping Intersection Search
350merge-path-searchMerge Path Search
Finger SearchSearch starting from a known nearby position, achieving time proportional to distance rather than full size.
3 min
Interpolation Sequential SearchEstimate the likely position using interpolation, then refine by local sequential scan.
3 min
Learned Index SearchUse a predictive model to estimate where a key should appear, then search within a bounded local range.
3 min
Recursive Model Index SearchUse a hierarchy of learned models to predict a key position, then search inside a bounded error range.
4 min
Branchless Binary SearchPerform binary search with conditional moves or arithmetic updates instead of unpredictable branches.
4 min
Eytzinger Layout SearchBinary search over an array arranged in heap order to improve cache locality and branch predictability.
3 min
Van Emde Boas Layout SearchSearch a binary tree stored in recursive cache oblivious layout to reduce memory transfers.
4 min
Cache Aware Binary SearchArrange and search sorted data with explicit knowledge of cache lines or memory blocks.
3 min
Branchless Lower BoundCompute lower bound using arithmetic or conditional moves instead of branches.
3 min
SIMD Linear SearchSearch several array elements at once using vector instructions.
3 min
SIMD Binary SearchUse vector instructions to evaluate multiple candidate positions in a binary search step.
4 min
Interpolation Search with FallbackUse interpolation to estimate the target position, with binary search fallback when estimates become unreliable.
5 min
Galloping Intersection SearchFind intersection of two sorted sequences using exponential jumps followed by binary search.
4 min
Merge Path SearchFind diagonal partition points that split a sorted merge into independent balanced ranges.
4 min
Exponential Backoff SearchExpand the search range exponentially until the target is bracketed, then refine within the range.
3 min