![](https://secure.gravatar.com/avatar/3958e748e0704904fc94840c6872566b.jpg?s=120&d=mm&r=g)
On Mon, Feb 1, 2021 at 4:00 PM Victor Stinner <vstinner@python.org> wrote:
In my opinion, the main advantage of HPy over the existing C API is that it's faster on PyPy. It doesn't provide advantage for CPython or for existing extensions using the C API.
I think this is true right now, but I suspect it will be possible to make HPy extensions run faster on CPython too, for the same reason that they can run faster on PyPy now -- i.e. the execution context is explicit and implementation details are not exposed. Exploring this requires HPy to be a bit more mature though so that CPython itself could consider how to better support HPy extensions.
The PEP 620 prepares CPython code base for future optimizations. It has a different scope.
Agreed!
HPy and PEP 620 projects can evolve in parallel, they are not incompatible ;-) But maybe if the PEP 620 can be fully implemented, it might become easier to port extension modules to HPy. But right now, it's not the case.
Also agreed.