Closed encukou closed 2 years ago
The No ABI mode provides a way to get performance, at the cost of binary compatibility. If you want top performance, you'll need to re-compile for different version and implementations.
HPy does something similar, maybe they have some data on the actual performance impact.
Apparently, making the current Py_INCREF/Py_DECREF be regular (non-inline) functions is too slow. I don't see how the proposed
PyRef_Dup
/PyRef_Free
would end up being called significantly less often than the current incref/decref. This proposal specifies ABI stability (“code compiled to older versions of the API will continue to work”), so it seems it'll either use static functions/macros and prevent changes to the refcounting mechanism, or export regular functions which will be too slow. Am I missing something? Is there a way out?