I have no idea, but if NPY_BEGIN_THREADS adds some real overhead it might be misplaced in the inner loop? I am not sure if it can be moved outside the inner loop though since MapIter might need it for some reason?