Chapter 12. Parallelism and Performance
In this chapter, we will cover the following recipes:
- Just-in-time compiling with Numba
 - Speeding up numerical expressions with Numexpr
 - Running multiple threads with the 
threadingmodule - Launching multiple tasks with the 
concurrent.futuresmodule - Accessing resources asynchronously with the 
asynciomodule - Distributed processing with 
execnet - Profiling memory usage
 - Calculating the mean, variance, skewness, and kurtosis on the fly
 - Caching with a least recently used cache
 - Caching HTTP requests
 - Streaming counting with the Count-min sketch
 - Harnessing the power of the GPU with OpenCL
 
Introduction
The ENIAC, built between 1943 and 1946, filled a large room with eighteen thousand tubes and had a 20-bit memory. We have come a long way since then. The growth has been exponential as also predicted by Moore's law. Whether we are dealing with a self-fulfilling prophecy or a fundamental phenomenon is, of course, hard to say. Purportedly, the growth is starting to...