Making np.searchsorted up to 25× Faster in NumPy 2.5
Summary
The Scientific Python Blog post documents a major speedup for NumPy's searchsorted in NumPy 2.5, achieving up to 25× faster performance through vectorized, batched algorithms and a C++ port. It explains the evolution from a pure Python approach to a memory-aware, branchless/interval-based strategy, with benchmarks comparing against NumPy 2.4 and other libraries. The work highlights the impact of memory layouts, parallelism, and cross-library considerations for high-performance numerical operations.