osdir.com


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

[Python-Dev] PEP 580/590 discussion


Hi,

On 01/04/2019 6:31 am, Jeroen Demeyer wrote:
> I added benchmarks for PEP 590:
> 
> https://gist.github.com/jdemeyer/f0d63be8f30dc34cc989cd11d43df248

Thanks. As expected for calls to C function for both PEPs and master 
perform about the same, as they are using almost the same calling 
convention under the hood.

As an example of the advantage that a general fast calling convention 
gives you, I have implemented the vectorcall versions of list() and range()

https://github.com/markshannon/cpython/compare/vectorcall-minimal...markshannon:vectorcall-examples

Which gives a roughly 30% reduction in time for creating ranges, or 
lists from small tuples.

https://gist.github.com/markshannon/5cef3a74369391f6ef937d52cca9bfc8

Cheers,
Mark.