-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
GH-106485: "Un-materialize" __dict__
s in LOAD_ATTR_WITH_HINT
#106496
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
Conversation
|
There a few scenarios that we should consider. Here are the two I'm concerned about:
In case 1, we will repeatedly materialize and dematerialize the It is case 2 that matters, IMO. We need to keep the relevant That suggests to me that dematerialization should occur in the specializer and, more importantly, in the deopt path of In |
According to the stats comparison, the number of So this is incredibly effective, but the results do suggest that some (Sorry, it looks like there aren't public links for these results.) |
See my comment above: the numbers suggest that the
I think this should stay out of the specializer, since that runs infrequently and only sees the first instance of a class at a given location. I'll try the |
Something about my merge messed up the diff, I think... |
__dict__
s if possible__dict__
s in LOAD_ATTR_WITH_HINT
#106539 is an alternative to this, using |
Closing in favor of #106539. |
There's a failure path in the specialized bytecode that is often hit by objects that have a materialized
__dict__
, but probably don't need it anymore.I'm running the benchmarks and gathering stats to see how promising this approach is.
__dict__
s #106485