Question: is numpy as fast as c++?
Answer: The answer is: your c++ code is not slower than your python code when properly compiled. I've done some benchmarks, and at first it seemed that numpy is surprisingly faster.