How vectorization speeds up your Python code
Python is not the fastest programming language. So when you need to process a large amount of homogeneous data quickly, you’re told to rely on “vectorization.”
This leads to more questions:
- What does “vectorization” actually mean?
- When does it apply?
- How does vectorization actually make code faster?
To answer that question, we’ll consider interesting performance metrics, learn some useful facts about how CPUs work, and discover that NumPy developers are working hard to make your code faster.
Source: How vectorization speeds up your Python code, an article by Itamar Turner-Trauring.