-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
gh-81057: Move the global Dict-Related Versions to _PyRuntimeState #99497
gh-81057: Move the global Dict-Related Versions to _PyRuntimeState #99497
Conversation
Include/internal/pycore_dict_state.h
Outdated
PyDictObject *free_list[PyDict_MAXFREELIST]; | ||
int numfree; | ||
PyDictKeysObject *keys_free_list[PyDict_MAXFREELIST]; | ||
int keys_numfree; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about reorder members to make struct compact?
PyDictObject *free_list[PyDict_MAXFREELIST]; | |
int numfree; | |
PyDictKeysObject *keys_free_list[PyDict_MAXFREELIST]; | |
int keys_numfree; | |
PyDictObject *free_list[PyDict_MAXFREELIST]; | |
PyDictKeysObject *keys_free_list[PyDict_MAXFREELIST]; | |
int numfree; | |
int keys_numfree; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind doing that, but it isn't much related to this PR and I was trying to minimize extra changes. That said, it is a fairly small and simple change so I'll go ahead and do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
5182895
to
f684dcd
Compare
Thanks for the review, @methane! For a domain-specific change to a complex component like this, it really helps to get an expert review, even if the change seems correct and straight-forward to me. 😄 |
We also move the global func version.