I have a defined function (optimized and vectorized with numpy) in Python, it runs smoothly, the thing is I have to perform the iteration 18 million times, so it takes some hour