Hi Stefan, 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. Victor Le ven. 26 juin 2020 à 23:37, Stefan Behnel <stefan_ml@behnel.de> 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 -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/NS5MTQFC... Code of Conduct: http://python.org/psf/codeofconduct/
-- Night gathers, and now my watch begins. It shall not end until my death.