Uh oh!
There was an error while loading. Please reload this page.
GH-123040: Specialize shadowed LOAD_ATTR. - #123219
Conversation
…ttribute. Provided that class attribute is not a data descriptor
…ass attributes with metaclasses or shadowed attributes.
iritkatriel
left a comment
There was a problem hiding this comment.
Stats show a 30% reduction in specialization failures for LOAD_ATTR.
Performance might show a slight speedup, but is more likely just noise.
Why is it useful to improve specialisation stats if it's not also improving performance?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
It probably does improve performance, and we would expect it to, but it's too small to measure. We also expect the difference to be magnified on tier 2, once that is more complete. |
iritkatriel
commented
Aug 22, 2024
LGTM, but I think another reviewer might make sense, @brandtbucher or @Fidget-Spinner maybe. |
brandtbucher
left a comment
There was a problem hiding this comment.
This is some pretty subtle stuff, but it looks correct to me! I wasn't able to make it do anything incorrect with a local build.
This PR specializes
LOAD_ATTRfor shadowed attributes, where the shadowing doesn't change the attribute.Stats show a 30% reduction in specialization failures for
LOAD_ATTR.Performance might show a slight speedup, but is more likely just noise.
LOAD_ATTRandSTORE_ATTRwhen attributes are shadowed by the object's class. #123040