Skip to content
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-115775: Use __static_attributes__ to initialize shared keys #118468

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented May 1, 2024

@markshannon
Copy link
Member Author

No need for news item as it is covered by #117909

@markshannon markshannon force-pushed the use-attributes-to-guide-inline-values-size branch from dedffa7 to 5032ad9 Compare May 1, 2024 13:56
@markshannon markshannon marked this pull request as ready for review May 1, 2024 20:38
@markshannon markshannon requested a review from methane as a code owner May 1, 2024 20:38
@markshannon markshannon force-pushed the use-attributes-to-guide-inline-values-size branch from 846a7ef to a7b858b Compare May 2, 2024 10:47
Python/specialize.c Outdated Show resolved Hide resolved
@markshannon markshannon force-pushed the use-attributes-to-guide-inline-values-size branch from b64de3d to d54afaf Compare May 3, 2024 18:30
@markshannon
Copy link
Member Author

markshannon commented May 3, 2024

The stats are not obviously better.

This PR reduces misses in LOAD_ATTR specializations, but it also increases the number of deferred operations due to shadowing.

Both STORE_ATTR_WITH_HINT and LOAD_ATTR_WITH_HINT are reduced in number considerably, being replaced by STORE_ATTR_INSTANCE_VALUE and LOAD_ATTR_INSTANCE_VALUE.

From this, it appears that this PR does what it aims to do. It also appears that it would be worth improving our handling of shadowed attributes.

I plan to fix the shadowing issue before merging this, so that it becomes a clear improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants