This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: replace PyTuple_SetItem() with PyTuple_SET_ITEM() in long_divmod()
Type: performance Stage: resolved
Components: Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, sir-sigurd
Priority: normal Keywords: patch

Created on 2019-02-21 09:41 by sir-sigurd, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11915 merged sir-sigurd, 2019-02-21 09:42
Messages (2)
msg336194 - (view) Author: Sergey Fedoseev (sir-sigurd) * Date: 2019-02-21 09:41
This change produces minor speed-up:

$ python-other -m perf timeit -s "divmod_ = divmod" "divmod_(1, 1)" --duplicate=1000 --compare-to=../cpython-master/venv/bin/python
python: ..................... 64.6 ns +- 4.8 ns
python-other: ..................... 59.4 ns +- 3.2 ns

Mean +- std dev: [python] 64.6 ns +- 4.8 ns -> [python-other] 59.4 ns +- 3.2 ns: 1.09x faster (-8%)
msg336196 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-02-21 10:01
New changeset ea6207d593832fe50dbca39e94c138abbd5d266d by Serhiy Storchaka (Sergey Fedoseev) in branch 'master':
bpo-36063: Minor performance tweak in long_divmod(). (GH-11915)
https://github.com/python/cpython/commit/ea6207d593832fe50dbca39e94c138abbd5d266d
History
Date User Action Args
2022-04-11 14:59:11adminsetgithub: 80244
2019-02-21 10:01:57serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-02-21 10:01:13serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg336196
2019-02-21 09:42:18sir-sigurdsetkeywords: + patch
stage: patch review
pull_requests: + pull_request11998
2019-02-21 09:41:35sir-sigurdcreate