osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] PEP 580 and PEP 590 comparison.


On 2019-04-27 11:26, Mark Shannon wrote:
> Performance improvements include, but aren't limited to:
>
> 1. Much faster calls to common classes: range(), set(), type(), list(),
> etc.

That's not specific to PEP 590. It can be done with any proposal. I know 
that there is the ABI issue with PEP 580, but that's not such a big 
problem as you seem to think (see my last e-mail).

> 2. Modifying argument clinic to produce C functions compatible with the
> vectorcall, allowing the interpreter to call the C function directly,
> with no additional overhead beyond the vectorcall call sequence.

This is a very good point. Doing this will certainly reduce the overhead 
of PEP 590 over PEP 580.

> 3. Customization of the C code for function objects depending on the
> Python code. The would probably be limited to treating closures and
> generator function differently, but optimizing other aspects of the
> Python function call is possible.

I'm not entirely sure what you mean, but I'm pretty sure that it's not 
specific to PEP 590.


Jeroen.