I'm interested in experimenting with a moving GC in CPython, but also by modifying the C API to make sure that it is efficient on PyPy or another Python implementation which uses a moving GC.
As Carl in the other thread, currently, other Python implementations have to emulate PyObject** which is inefficient.
Right now, the C API is an exact mapping of CPython internals which prevents us to enhance or optimize CPython, but also makes other Python implementations inefficient when running C extensions.
Le ven. 26 juin 2020 à 23:37, Stefan Behnel firstname.lastname@example.org a écrit :
Victor Stinner schrieb am 26.06.20 um 14:39:
Well, the general problem is to track when the caller ends using a resource.
Although that is less of a problem if you only allow exposing the internal data representation and nothing else. In that case, you can tie the lifetime of the data access to the lifetime of the object.
Minus moving GCs, as Carl also pointed out. But even there, you could get away (probably for quite a while) with pinning the data if someone asked for it.
Stefan _______________________________________________ Python-Dev mailing list -- email@example.com To unsubscribe send an email to firstname.lastname@example.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://email@example.com/message/NS5MTQFC... Code of Conduct: http://python.org/psf/codeofconduct/