None
EN
Binary search variants and the effects of batching
['Ragnar', 'Groot Koerkamp']
home on CuriousCoding
This replicates the result from the first plot in Algorithmica, where the naive code is much slower on small array sizes but faster on large array sizes. Here we see that increasing batch size too much hurts performance on small array sizes, and does not improve performance much beyond batch size 16 on large array sizes. This is to be expected, because S-trees can do essentially four layers of the search in a single iteration using one memory query whereas binary search or Eytzinger will need four memory requests.