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: optimize dict_traverse a bit
Type: performance Stage: resolved
Components: Interpreter Core Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, methane, python-dev
Priority: normal Keywords: patch

Created on 2016-09-05 19:02 by benjamin.peterson, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
traverse.patch benjamin.peterson, 2016-09-05 19:02 review
Messages (4)
msg274420 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2016-09-05 19:02
dict_traverse shows up a lot on statistical profiles of Python programs. This is not surprising since Python programs have lots of dicts. There isn't a huge amount of room for optimization here, but we can avoid some memory indirection. This patch saves a few percent of time through this function in my measurements.
msg274421 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-09-05 19:11
lgtm.
But http://bugs.python.org/issue27350 conflicts this.
msg274422 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2016-09-05 19:13
Thank you for the review.

On Mon, Sep 5, 2016, at 12:11, INADA Naoki wrote:
> 
> INADA Naoki added the comment:
> 
> lgtm.
> But http://bugs.python.org/issue27350 conflicts this.
> 
> ----------
> nosy: +methane
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue27956>
> _______________________________________
msg274423 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-05 19:13
New changeset 027e421594b7 by Benjamin Peterson in branch 'default':
remove memory indirections in dict_traverse (closes #27956)
https://hg.python.org/cpython/rev/027e421594b7
History
Date User Action Args
2022-04-11 14:58:35adminsetgithub: 72143
2016-09-05 19:13:25python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg274423

resolution: fixed
stage: resolved
2016-09-05 19:13:10benjamin.petersonsetmessages: + msg274422
2016-09-05 19:11:48methanesetnosy: + methane
messages: + msg274421
2016-09-05 19:02:13benjamin.petersoncreate