The correct mental model would be "it adds the C arrays, in C, quickly". ;)
If you pass it python lists, in a tight loop, it's going to be near orders of magnitude slower, for something like an add, regardless of item count. This is a mistake I often see with an attempt to "we'll just make it faster with numpy!"
The correct mental model would be "it adds the C arrays, in C, quickly". ;)
If you pass it python lists, in a tight loop, it's going to be near orders of magnitude slower, for something like an add, regardless of item count. This is a mistake I often see with an attempt to "we'll just make it faster with numpy!"