On Thu, Feb 21, 2019 at 6:01 AM Armin Rigo <armin.r...@gmail.com> wrote:

> Hi,
>
> On Tue, 19 Feb 2019 at 13:12, Victor Stinner <vstin...@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-for-small-integers
> >
> > 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.
>

While it's unfortunate we start this conversation back when PyPy started to
suffer through this so that we could try to make it easier for them, I
don't want people to think trying to come up with a simpler FFI API
eventually wouldn't be beneficial to other implementations (either ones
that haven't reach Python 3 yet or have not even been written).
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to