diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-02-06 15:06:49 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-02-06 15:06:49 (GMT) |
commit | dd407d5006809646ff42ef1b120c67dc794418cf (patch) | |
tree | cfb708c8d8092bc69683460990f3b6428fa2e821 /Python/Python-ast.c | |
parent | 193ee0a0e8c543f8f731f8207df21a6cc1a08591 (diff) | |
download | cpython-dd407d5006809646ff42ef1b120c67dc794418cf.zip cpython-dd407d5006809646ff42ef1b120c67dc794418cf.tar.gz cpython-dd407d5006809646ff42ef1b120c67dc794418cf.tar.bz2 |
Optimize deque index, insert and rotate() methods
Issue #29452: Use METH_FASTCALL calling convention for index(), insert() and
rotate() methods of collections.deque to avoid the creation a temporary tuple
to pass position arguments. Speedup on deque methods:
* d.rotate(): 1.10x faster
* d.rotate(1): 1.24x faster
* d.insert(): 1.18x faster
* d.index(): 1.24x faster
Diffstat (limited to 'Python/Python-ast.c')
0 files changed, 0 insertions, 0 deletions