I implemented both here. As you'd expect the non-recursive version is fastest on the random access collection SortedArray
(both axes are logarithmic):
When it comes to using binary search on non-random access collections it seems the built-in start-from-the-beginning-and-check-every-element is faster, at least with DefaultIndices<String>
:
All the code is available here.