<div dir="ltr"><div>Hi,</div><div><br></div><div>I have just added a new PR: <a href="https://github.com/numpy/numpy/pull/4244">https://github.com/numpy/numpy/pull/4244</a></div><div><br></div><div>From the commit message:</div>
<div><br></div><div><div>This PR replaces the generic binary search functions used by `searchsorted`</div><div>with type specific ones for numeric types. This results in a speed-up of</div><div>calls to `searchsorted` which is highly dependent on the size of the</div>
<div>'haystack' and the 'needle', with typical values for large enough needles</div><div>in the 1.5x - 3.0x for direct searches (i.e. without a sorter argument)</div><div>and 1.2x - 2.0x for indirect searches. A summary benchmark on float and</div>
<div>int arrays can be found here.</div><div><br></div><div>Furthermore, the type specific binary search functions can take strided</div><div>inputs for all their arguments, which is a step in the right direction to</div>
<div>eventually add an axis argument to`searchsorted`.</div><div><br></div><div>Any comments and reviews are more than welcome!</div><div><br></div><div>Jaime</div><div><div><br></div>-- <br>(\__/)<br>( O.o)<br>( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes de dominación mundial.
</div></div></div>