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

[Python-Dev] Micro-benchmarks for PEP 580

OK, I tried with --duplicate 200 and you can see the results at

In short, the timings with and without PEP 580 are roughly the same 
(which is to be expected). Interestingly, a small but significant 
improvement can be seen when calling *unbound* methods.

The real improvement comes from supporting a new calling protocol: 
formerly custom classes could only implement tp_call, but now they can 
use FASTCALL just like built-in functions/methods. For this, there is an 
improvement of roughly a factor 1.2 for calls without arguments, 1.6 for 
calls with positional arguments and 2.8 for calls with keywords.