8000 Don't double count misses. by markshannon · Pull Request #100984 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Don't double count misses. #100984

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

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

markshannon
Copy link
Member

The stats include stats for both family and individual specializations.
We count both, so that miss stats are counted twice.
Like this:

Name Count Ratio
LOAD_ATTR 406,728,834 26.4%
LOAD_ATTR_INSTANCE_VALUE 171,350,225 11.1%
LOAD_ATTR_METHOD_WITH_VALUES 132,506,001 8.6%
FOR_ITER 129,609,338 8.4%
CALL 111,339,072 7.2%
LOAD_ATTR_SLOT 78,819,833 5.1%
STORE_ATTR 76,701,255 5.0%
FOR_ITER_LIST 64,857,086 4.2%
FOR_ITER_TUPLE 64,699,272 4.2%
STORE_ATTR_INSTANCE_VALUE 62,035,400 4.0%

But it should be like this (generated with this PR):

Name Count Ratio
LOAD_ATTR_INSTANCE_VALUE 171,351,730 22.3%
LOAD_ATTR_METHOD_WITH_VALUES 132,506,047 17.2%
LOAD_ATTR_SLOT 78,819,772 10.2%
FOR_ITER_LIST 64,862,043 8.4%
FOR_ITER_TUPLE 64,682,424 8.4%
STORE_ATTR_INSTANCE_VALUE 62,035,400 8.1%
CALL_PY_EXACT_ARGS 45,091,957 5.9%
CALL_NO_KW_METHOD_DESCRIPTOR_FAST 28,636,465 3.7%
CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS 20,373,269 2.6%
BINARY_OP_SUBTRACT_FLOAT 15,092,840 2.0%

This is important as the ratio of misses to deferred instructions determines where we put our efforts in improving specialization.

Copy link
Contributor
@mdboom mdboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Should we re-run this over the existing stats we've collected to avoid confusion?

@markshannon
Copy link
Member Author

The stats are always out of date, so probably not worth it.
We should just delete old stats.

@markshannon markshannon merged commit c00eb1e into python:main Jan 13, 2023
@markshannon markshannon deleted the dont-double-count-misses branch September 26, 2023 12:53
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.

3 participants
0