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年10月22日 18:15 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| odict_knownhash.patch | serhiy.storchaka, 2015年10月22日 18:15 | review | ||
| odict_knownhash_2.patch | serhiy.storchaka, 2015年11月06日 11:23 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg253343 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年10月22日 18:15 | |
There are private _PyDict_*_KnownHash functions that allow to avoid repeated hash calculation in complex operations with a dict. Proposed patch makes C implementation of OrderedDict to use these functions. It is not just an optimization, it makes some OrderedDict methods atomic (or almost atomic), that decreases a chance to desynchronize the linked list with the dict. That is why I suggest to commit the patch in 3.5. |
|||
| msg254182 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年11月06日 10:18 | |
Could you please make a review of this patch Eric? It is moved to separate issue because it is enough large and complex. |
|||
| msg254294 - (view) | Author: Raymond Hettinger (rhettinger) * (Python committer) | Date: 2015年11月07日 20:07 | |
The patch looks correct, and it improves the integrity of the C implementation. |
|||
| msg254296 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2015年11月07日 20:22 | |
I agree with Raymond. |
|||
| msg254603 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年11月13日 13:19 | |
New changeset 52ff0c00a404 by Serhiy Storchaka in branch '3.5': Issue #25462: The hash of the key now is calculated only once in most https://hg.python.org/cpython/rev/52ff0c00a404 New changeset 828c9b920532 by Serhiy Storchaka in branch 'default': Issue #25462: The hash of the key now is calculated only once in most https://hg.python.org/cpython/rev/828c9b920532 |
|||
| msg254604 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年11月13日 13:20 | |
Thank you Raymond and Eric. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:23 | admin | set | github: 69648 |
| 2015年11月13日 13:21:16 | serhiy.storchaka | set | stage: commit review -> resolved |
| 2015年11月13日 13:21:03 | serhiy.storchaka | set | status: open -> closed resolution: fixed |
| 2015年11月13日 13:20:35 | serhiy.storchaka | set | messages: + msg254604 |
| 2015年11月13日 13:19:12 | python-dev | set | nosy:
+ python-dev messages: + msg254603 |
| 2015年11月07日 20:22:10 | eric.snow | set | messages:
+ msg254296 stage: patch review -> commit review |
| 2015年11月07日 20:07:46 | rhettinger | set | messages: + msg254294 |
| 2015年11月06日 11:23:33 | serhiy.storchaka | set | files: + odict_knownhash_2.patch |
| 2015年11月06日 10:18:13 | serhiy.storchaka | set | messages: + msg254182 |
| 2015年10月22日 18:15:07 | serhiy.storchaka | create | |