Re: [Python-Dev] Making PyInterpreterState an opaque type

2019年2月21日 14:16:06 -0800

On Thu, Feb 21, 2019 at 6:01 AM Armin Rigo <[email protected]> wrote:
> Hi,
>
> On 2019年2月19日 at 13:12, Victor Stinner <[email protected]> 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
[email protected]
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