[Python-Dev] New calling convention to avoid temporarily tuples when calling functions (original) (raw)
Victor Stinner victor.stinner at gmail.com
Mon Aug 8 18:53:43 EDT 2016
- Previous message (by thread): [Python-Dev] New calling convention to avoid temporarily tuples when calling functions
- Next message (by thread): [Python-Dev] New calling convention to avoid temporarily tuples when calling functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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):
- pickle_list: 1.29x faster
- etree_generate: 1.22x faster
- pickle_dict: 1.19x faster
- etree_process: 1.16x faster
- mako_v2: 1.13x faster
- telco: 1.09x faster
- raytrace: 1.08x faster
- etree_iterparse: 1.08x faster (...)
See https://bugs.python.org/issue26814#msg266359
Victor
- Previous message (by thread): [Python-Dev] New calling convention to avoid temporarily tuples when calling functions
- Next message (by thread): [Python-Dev] New calling convention to avoid temporarily tuples when calling functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]