New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:
The proposed PR converts OrderedDict.pop() to Argument Clinic. It makes it 2 times faster. $ ./python -m pyperf timeit -q --compare-to=../cpython-release2/python -s "from collections import OrderedDict; od = OrderedDict()" "od.pop('x', None)" Mean +- std dev: [/home/serhiy/py/cpython-release2/python] 119 ns +- 2 ns -> [/home/serhiy/py/cpython-release/python] 56.3 ns +- 1.2 ns: 2.12x faster (-53%) It was not converted before because Argument Clinic generated incorrect signature for it. It still is not able to generate correct signature, but at least it does not generate incorrect signature. And we now have other reason for using Argument Clinic -- performance. ---------- components: Argument Clinic, Extension Modules messages: 373905 nosy: larry, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Convert OrderedDict.pop() to Argument Clinic type: performance versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41333> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com