On 2/02/22 12:32 pm, Christopher Barker wrote:

I can make a "thick" high performance wrapper, e.g. if I want to call an 
expensive C function on each item in a sequence, I can do that in Cython, removing a lot 
of the overhead of Python.

"Not as fast as possible" doesn't necessarily mean *slow*. Even using
the stable ABI, the code you get will still be a lot more efficient than
a Python wrapper.

Sure, but this thread is not just about users like me, that can choose the more stable way or the faster way, but specifically about numpy, which is going to use the fast way -- and we don't want to break that any more than absolutely necessary.

I'm skeptical about how much difference it would actually make. Numpy
gets its speed from tight loops in C and calling out to C and Fortran
libraries. None of that is affected by which CPython API is being
used.

In any case, if numpy explicitly chooses speed over compatibility, that's an issue between CPython and numpy, not CPython and Cython.

--
Greg


_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/UJOVLMM4OJVSGZAEVVTTNQJCNB4GWTYS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to