WIP: searchsorted implementation