bpo-44206: Add a version number to dictionary keys #26333
Merged
Conversation
…sion is 0 before modification of a key.
Skipping news, as this is strictly internal. |
3cfccd7
to
0088371
Objects/dictobject.c
Outdated
|
||
CHECK(0 <= mp->ma_used && mp->ma_used <= usable); | ||
CHECK(IS_POWER_OF_2(keys->dk_size)); | ||
CHECK(IS_POWER_OF_2(DK_SIZE(keys))); |
Performance results |
Objects/dict-common.h
Outdated
typedef enum { | ||
DICT_KEYS_GENERAL = 0, | ||
DICT_KEYS_UNICODE = 1, | ||
DICT_KEYS_UNICODE_NO_DUMMY = 2, |
methane
May 27, 2021
Member
_Py_dict_lookup()
don't have specialized case for DICT_KEYS_UNICODE_NO_DUMMY. Can we delete this kind?
This kind is used only here.
Line 1226 in a316f34
But it can be replaced with mp->ma_used > mp->ma_keys->dk_nentries
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Apart from adding a version number, this PR also:
I'll need to run pyperformance before merging, in case this slows things downs.
https://bugs.python.org/issue44206