summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polyutils.py
diff options
context:
space:
mode:
authorjaimefrio <jaime.frio@gmail.com>2014-01-29 23:26:19 -0800
committerjaimefrio <jaime.frio@gmail.com>2014-01-29 23:28:32 -0800
commit7044588130a2316db8dc3abd081a8e6655d98cac (patch)
treed23bca483be848525be6e2f4813dca12ff5540c7 /numpy/polynomial/polyutils.py
parentad5bded8658c41161106a1ed51e3889bc1cf6b6b (diff)
downloadnumpy-7044588130a2316db8dc3abd081a8e6655d98cac.tar.gz
ENH: Type specific binary search functions for `searchsorted`
This PR replaces the generic binary search functions used by `searchsorted` with type specific ones for numeric types. This results in a speed-up of calls to `searchsorted` which is highly dependent on the size of the 'haystack' and the 'needle', with typical values for large enough needles in the 1.5x - 3.0x for direct searches (i.e. without a `sorter` argument) and 1.2x - 2.0x for indirect searches. A summary benchmark on float and int arrays can be found [here](https://gist.github.com/jaimefrio/8704101). Furthermore, the type specific binary search functions can take strided inputs for all their arguments, which is a step in the right direction to eventually add an `axis` argument to `searchsorted`.
Diffstat (limited to 'numpy/polynomial/polyutils.py')
0 files changed, 0 insertions, 0 deletions