Hi, from pythran/pythonic/patch/README.rst """ The implementation of std::complex is very slow, due to the complex limited range (see `-fcx-limited-range`) feature. Numpy does not implement it, so we have to conform to numpy's version. """I don't get it. To begin with, the implementation of std::complex is very slow due the ABSENCE of complex limited range.
Then what it is about the Numpy statement?Complex in Python (Core, not Numpy), implements the division with range reduction: https://github.com/python-git/python/blob/master/Objects/complexobject.c#L92 This is far from the patch in C++ complex: (__c * __a + __d * __b, __c * __b - __d * __a) / __e;
Moreover I don't even get the validity of that. You are replacing an implementation in a standard library, really???? This looks like a really bad thing to do.
If your problem is that NT2 expect std::complex, then patch NT2! Mehdi