Binary search has been applied to improve the performance of classify tools in NumPy case (https://github.com/makepath/xarray-spatial/pull/760). Let's see if we can do the same thing for CuPy case.