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.
Created on 2015年06月02日 14:00 by eric.snow, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue24362-odict-resize.diff | eric.snow, 2015年06月02日 22:47 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg244667 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2015年06月02日 14:00 | |
Between comments on issue16991 and review comments there, it's clear that the implementation of _odict_resize and _odict_get_index in Objects/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 moved down. 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 changeset c78c5832ccc0 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 | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:17 | admin | set | nosy:
+ larry, ned.deily github: 68550 |
| 2015年06月07日 19:03:42 | Arfrever | set | status: open -> closed stage: patch review -> resolved |
| 2015年06月03日 16:55:46 | eric.snow | set | type: behavior resolution: fixed messages: + msg244773 |
| 2015年06月03日 16:54:49 | python-dev | set | nosy:
+ python-dev messages: + msg244772 |
| 2015年06月03日 13:52:51 | skrah | set | messages: + msg244746 |
| 2015年06月02日 22:47:44 | eric.snow | set | files:
+ issue24362-odict-resize.diff keywords: + patch messages: + msg244708 stage: needs patch -> patch review |
| 2015年06月02日 19:24:17 | yselivanov | set | nosy:
+ yselivanov |
| 2015年06月02日 14:00:31 | eric.snow | create | |