[Python-Dev] New calling convention to avoid temporarily tuples when calling functions (original) (raw)

Yury Selivanov yselivanov.ml at gmail.com
Mon Aug 8 21:16:16 EDT 2016


On 2016-08-08 6:53 PM, Victor Stinner wrote:

2016-08-09 0:40 GMT+02:00 Guido van Rossum <guido at python.org>:

tl;dr I found a way to make CPython 3.6 faster and I validated that there is no performance regression. But is there a performance improvement? Sure. On micro-benchmarks, you can see nice improvements: * getattr(1, "real") becomes 44% faster * list(filter(lambda x: x, list(range(1000)))) becomes 31% faster * namedtuple.attr becomes -23% faster * etc. See https://bugs.python.org/issue26814#msg263999 for default => patch, or https://bugs.python.org/issue26814#msg264003 for comparison python 2.7 / 3.4 / 3.5 / 3.6 / 3.6 patched. On the CPython benchmark suite, I also saw many faster benchmarks: Faster (25): - picklelist: 1.29x faster - etreegenerate: 1.22x faster - pickledict: 1.19x faster - etreeprocess: 1.16x faster - makov2: 1.13x faster - telco: 1.09x faster - raytrace: 1.08x faster - etreeiterparse: 1.08x faster (...)

Exceptional results, congrats Victor. Will be happy to help with code review.

Yury



More information about the Python-Dev mailing list