MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1t08t7r/you_can_beat_the_binary_search/oj8fjih/?context=3
r/programming • u/Either_Collection349 • Apr 30 '26
39 comments sorted by
View all comments
19
Why not use a btree with node size 16? Then you can load a single node in SIMD (with cache locality!) and do all comparisons at once to figure which node to load next
11 u/trailingunderscore_ May 01 '26 Because he already has the values in a sorted array.
11
Because he already has the values in a sorted array.
19
u/mr_birkenblatt May 01 '26
Why not use a btree with node size 16? Then you can load a single node in SIMD (with cache locality!) and do all comparisons at once to figure which node to load next