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

Fixup 'LOAD_METHOD' specialization stats so that they display properly. #93812

Merged

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Jun 14, 2022

With this PR, the specialization stats for LOAD_ATTR now display properly.


LOAD_ATTR

specialization stats for LOAD_ATTR family
Kind Count Ratio
unquickened 234936676 3.8%
specialization.deferred 701617362 11.3%
specialization.deopt 2817399 0.0%
hit 5144908243 82.5%
miss 153019671 2.5%

Specialization attempts

Count Ratio
Success 5166904 65.2%
Failure 2751896 34.8%
Failure kind Count Ratio
property 380454 13.8%
overridden 350626 12.7%
not managed dict 324824 11.8%
method 319486 11.6%
overriding descriptor 256699 9.3%
out of range 232721 8.5%
non object slot 216423 7.9%
metaclass attribute 189030 6.9%
class method obj 171201 6.2%
mutable class 156896 5.7%
non overriding descriptor 117729 4.3%
has managed dict 96775 3.5%
builtin class method 46116 1.7%
shadowed 4951 0.2%
module attr not found 4901 0.2%
other 1562 0.1%

@markshannon markshannon requested a review from Fidget-Spinner Jun 14, 2022
@markshannon markshannon merged commit 6b33000 into python:main Jun 14, 2022
12 checks passed
@Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented Jun 14, 2022

Thanks for fixing up the stats. It's interesting that the specialisation hits went up after merging the instructions.

FYI, I'm working on specializations for:

  • property
  • method
  • non overriding descriptor
  • mutable class

@markshannon
Copy link
Member Author

@markshannon markshannon commented Jun 14, 2022

The increased rate of specialization hits might be due to exponential backoff. We get fewer specialization failures.

@Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented Jun 14, 2022

It might be due to better specialization forms too. Looking at the stats, the old instance attribute methods and load class attribute failures are now gone thanks to the instruction merge :).

@markshannon
Copy link
Member Author

@markshannon markshannon commented Jun 14, 2022

I'm sure some is due to improved specialization, but be aware that exponential backoff means that the success ratio will appear to be higher than it really is.

It is the hit ratio that really matters.

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

3 participants