[Python-Dev] Making PyInterpreterState an opaque type

Victor Stinner vstinner at redhat.com
Tue Feb 19 07:09:53 EST 2019


Le mar. 19 févr. 2019 à 11:57, INADA Naoki <songofacandy at gmail.com> a écrit :
> On the other hand, it makes sense to move _PyTuple_ITEMS to (3) or even (2).
> PyTuple_ITEMS(t) seems better than &PyTuple_GET_ITEM(t, 0).

Please don't use &PyTuple_GET_ITEM() or _PyTuple_ITEMS(). It prevents
to use a more efficient storage for tuple. Something like:
https://pythoncapi.readthedocs.io/optimization_ideas.html#specialized-list-for-small-integers

PyPy already has the issue right now.

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.


More information about the Python-Dev mailing list