Numpy array iteration is very slow
I have noticed that Numpy array iteration is extremely slow (about 20 times slower than CPython):
>>>> arr = np.zeros(1 << 24) # 16M Entries >>>> list_arr = list(arr) # Takes 20 seconds with Pypy3! CPython "just" 1 second.
I was wondering why this happens and whether it would be possible to speed it up? This is one of the most performance critical aspects of working with Numpy - not all the operations can be expressed with Numpy calls.
list_arr = list_arr[:] is very fast (as it should be) taking just ~0.03s.