Make your parallel NumPy code fast: the secret sauce
When dealing with parallel processing of large NumPy arrays such as image or video data, you should be aware of this simple approach to speeding up your code.
Multiprocessing versus Concurrency in Python
First, a quick primer on some terminology.
In Python, if we want to take full advantage of the processing power of your CPU, you need need to use multiprocessing (typically achieved via the
multiprocessing library). This library is therefore well suited for CPU intensive tasks. If we wish to efficiently…