Discover more from Daily Dose of Data Science
Speed-up NumPy 20x with Numexpr
Numpy already offers fast and optimized vectorized operations. Yet, it does not support parallelism. This provides further scope for improving the run-time of NumPy.
To do so, use Numexpr. It allows you to speed up numerical computations with multi-threading and just-in-time compilation.
Depending upon the complexity of the expression, the speed-ups can range from 0.95x and 20x. Typically, it is expected to be 2x-5x.
Read more: Documentation.
Share this post on LinkedIn: Post Link.
Thanks for reading Daily Dose of Data Science! Subscribe for free to receive new posts and support my work.
Find the code for my tips here: GitHub.