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.
Get a weekly summary of the top 1% Research papers, News, Open Source Repos, and Tweets in Machine Learning.
Find the code for my tips here: GitHub.
I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn.