[Python-Dev] C API changes

Steve Dower steve.dower at python.org
Tue Nov 27 12:12:31 EST 2018


On 27Nov2018 0609, Victor Stinner wrote:
> Note: Again, in my plan, the new C API would be an opt-in API. The old
> C API would remain unchanged and fully supported. So there is no
> impact on performance if you consider to use the old C API.

This is one of the things that makes me think your plan is not feasible.

I *hope* that remaining on the old C API eventually has a performance 
impact, since the whole point is to enable new optimizations that 
currently require tricky emulation to remain compatible with the old 
API. If we never have to add any emulation for the old API, we haven't 
added anything useful for the new one.

Over time, the old C API's performance (not functionality) should 
degrade as the new C API's performance increases. If the increase isn't 
significantly better than the degradation, the whole project can be 
declared a failure, as we would have been better off leaving the API 
alone and not changing anything.

But this is great discussion. Looking forward to seeing some of it turn 
into reality :)

Cheers,
Steve


More information about the Python-Dev mailing list