Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue24362

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Simplify the fast nodes resize logic in C OrderedDict.
Type:behaviorStage:resolved
Components:Library (Lib)Versions:Python 3.6, Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: eric.snowNosy List: eric.snow, larry, ned.deily, python-dev, skrah, yselivanov
Priority:release blockerKeywords:patch

Created on2015-06-02 14:00 byeric.snow, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
issue24362-odict-resize.differic.snow,2015-06-02 22:47review
Messages (5)
msg244667 -(view)Author: Eric Snow (eric.snow)*(Python committer)Date: 2015-06-02 14:00
Between comments onissue16991 and review comments there, it's clear that the implementation of _odict_resize and _odict_get_index inObjects/odictobject.c are too complicated to be a long-term solution.  simplifying the approach to avoid recursion should help substantially.
msg244708 -(view)Author: Eric Snow (eric.snow)*(Python committer)Date: 2015-06-02 22:47
Here's a patch that adds stores the hash on each node.  This eliminates the need to call PyObject_Hash when rebuilding the fast nodes table during a resize.  The patch also drops a superfluous while loop.
msg244746 -(view)Author: Stefan Krah (skrah)*(Python committer)Date: 2015-06-03 13:52
I think this is much nicer, thank you!And the XXX comment looks right, updating od_size could be moveddown.  I suspect that updating it too early was the cause for#24361, which is also solved by this patch.
msg244772 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2015-06-03 16:54
New changesetc78c5832ccc0 by Eric Snow in branch '3.5':Issue#24362: Simplify the C OrderedDict fast nodes resize logic.https://hg.python.org/cpython/rev/c78c5832ccc0
msg244773 -(view)Author: Eric Snow (eric.snow)*(Python committer)Date: 2015-06-03 16:55
Thanks for pushing this, Stefan (and Jim). :)
History
DateUserActionArgs
2022-04-11 14:58:17adminsetnosy: +larry,ned.deily
github: 68550
2015-06-07 19:03:42Arfreversetstatus: open -> closed
stage: patch review -> resolved
2015-06-03 16:55:46eric.snowsettype: behavior
resolution: fixed
messages: +msg244773
2015-06-03 16:54:49python-devsetnosy: +python-dev
messages: +msg244772
2015-06-03 13:52:51skrahsetmessages: +msg244746
2015-06-02 22:47:44eric.snowsetfiles: +issue24362-odict-resize.diff
keywords: +patch
messages: +msg244708

stage: needs patch -> patch review
2015-06-02 19:24:17yselivanovsetnosy: +yselivanov
2015-06-02 14:00:31eric.snowcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp