NumPy 2.0 Brings Faster Performance Thanks To Intel's x86-simd-sort & Google's Highway

Written by Michael Larabel in Programming on 17 June 2024 at 06:09 AM EDT. 13 Comments
PROGRAMMING
NumPy 2.0 was released on Sunday that's been in the making for the past year and their first major release since 2006. While it comes with API/ABI breakage, NumPy 2.0 delivers new features and performance improvements.

Interesting on the performance front is that NumPy 2.0's sorting functions like sort / argsort / partition / argpartition are much faster than before. NumPy is now leveraging Intel's x86-simd-sort library and Google's Highway for achieving "large speedups" with the new NumPy version.

On Phoronix I've previously covered the massive performance potential of x86-simd-sort with much faster sorting thanks to leveraging AVX-512 and other modern ISA features. Google's Highway also helps with performance-portable SIMD with run-time dispatch. Highway helps with not only targeting AVX2 and AVX-512 but many processor family sub-targets, RISC-V RVV, ARM NEON, and other processors.

NumPy logo


NumPy 2.0 also brings opt_func_info as a new tracing and introspection API for probing hardware-specific kernels available and dispatching to them. NumPy 2.0 additionally brings a new "StringDType" variable-length string dtype, many string improvements, support for float32 and longdouble in NumPy FFT functions, and other C and Python API additions.

Downloads and more details on NumPy 2.0 via NumPy.org.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week