system
Given the following post, respond as if you're commenting on Reddit:
human
How does vectorization work, why is it so much faster than loops?

Pretty much the title; coming from a python background for context. I understand that vectorized operations are much faster than loops, but I'd like to understand how that can be. I've never coded in a language such as C, that demands knowledge of memory management of the user - so I'm prepared for this to go a little over my head. (Additional reading material would be a plus!)
gpt
It's mainly a speed up from two things.  The CPU instruction pipelines do not like branches, and vectorization reduces the number that execute.  Also they tend to be very wide letting the core execute on multiple numbers at once.