New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid repeated hash calculation in C implementation of OrderedDict #69648
Comments
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. |
Could you please make a review of this patch Eric? It is moved to separate issue because it is enough large and complex. |
The patch looks correct, and it improves the integrity of the C implementation. |
I agree with Raymond. |
New changeset 52ff0c00a404 by Serhiy Storchaka in branch '3.5': New changeset 828c9b920532 by Serhiy Storchaka in branch 'default': |
Thank you Raymond and Eric. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: