You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
bpo-44337: Shrink the LOAD_ATTR/STORE_ATTR caches#31517
Can't the same idea shrink LOAD_METHOD from 3 entries down to 2? Then _PyAttrCache can be eliminated altogether.
I was looking at LOAD_METHOD yesterday, and it needs 3 slots of data for Python methods. It needs the type version, the shared dict-keys's version and a pointer to the Python function, in addition to the count and original oparg. We could try using 16 bits for one of the versions, saving a slot at the cost of more specialization failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.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.Suggestions cannot be applied while the pull request is queued to merge.
One adaptive entry is enough.
https://bugs.python.org/issue44337