Hi, On Tue, 19 Feb 2019 at 13:12, Victor Stinner <vstinner@redhat.com> wrote:
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-f...
PyPy already has the issue right now.
Just to clarify PyPy's point of view (or at least mine): 1. No, it no longer has this issue. You can misuse ``&PyTuple_GET_ITEM()`` freely with PyPy too. 2. This whole discussion is nice but is of little help to PyPy at this point. The performance hit comes mostly from emulating reference counting and non-movable objects. If the API was half the size and did not contain anything with irregular behavior, it would have made our job easier in the past, but now it's done---and it wouldn't have improved the performance of the result. A bientôt, Armin.