On Wed, Apr 30, 2025 at 02:08:36PM +0200, PIERRE AUGIER wrote:
> It seems to me that a strategy based on HPy would give practical benefices 
> for users in a much shorter time (typically few years) than just waiting for 
> CPython C API evolution.

It would be nice to use alternative interpreters, but I still see conflicting
messages about the performance of HPy:

https://github.com/psycopg/psycopg/issues/154

"If the goal is to run psycopg3 fast in PyPy, there are at least three paths:

    use a cffi backend: this is likely to be the fastest one
    (in case psycopg uses Cython and doesn't call directly any CPython C API): 
use the Cython HPy backend, once it's ready
    (in case psycopg uses the CPython C API directly): rewrite it to use HPy 
instead."


CFFI however is slower, e.g. for _decimal, than the native CPython C-API.
(At least it was in version 3.9, _decimal has been slowed down significantly
since I left.)

_decimal of course operates on scalars and has many API calls, so maybe
for NumPy this is not relevant except for small arrays.


Or perhaps HPy has evolved in the meantime (the above GitHub thread is from 
2022). 


Stefan Krah

_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to