Skip to content

bpo-45885: Don't un-adapt COMPARE_OP when collecting stats - #31516

Merged
markshannon merged 3 commits into
python:mainfrom
brandtbucher:compare-op-stats
Feb 23, 2022
Merged

bpo-45885: Don't un-adapt COMPARE_OP when collecting stats#31516
markshannon merged 3 commits into
python:mainfrom
brandtbucher:compare-op-stats

Conversation

@brandtbucher

@brandtbucherbrandtbucher commented Feb 22, 2022

Copy link
Copy Markdown
Member

The current stats obscure the fact that "not followed by conditional jump" accounts for a significant portion of possible COMPARE_OP hits. This patch takes the same approach that BINARY_OP uses of only un-adapting the instruction when stats aren't being collected.

New stats:

COMPARE_OP

specialization stats for COMPARE_OP family
KindCountRatio
unquickened73621560.4%
specialization.deferred28810201217.2%
specialization.deopt156420.0%
hit137419146482.3%
miss9594400.1%

Specialization attempts

CountRatio
Success3731717.4%
Failure465080492.6%
Failure kindCountRatio
not followed by cond jump264733256.9%
float long66564314.3%
set58021212.5%
different types1517883.3%
bool1375833.0%
other1272482.7%
tuple1202302.6%
big int1014012.2%
bytes528391.1%
baseobject425850.9%
list230360.5%
string7060.0%
long float2010.0%

https://bugs.python.org/issue45885

@sweeneydesweeneyde left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice -- this puts this failure kind on equal footing with the other failure kinds so the stats are more honest.

@markshannon

Copy link
Copy Markdown
Member

👍

@markshannon
markshannon merged commit 375a56b into python:mainFeb 23, 2022
@brandtbucher
brandtbucher deleted the compare-op-stats branch July 21, 2022 20:16
@sweeneydesweeneyde mentioned this pull request Apr 10, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@brandtbucher@markshannon@sweeneyde@the-knights-who-say-ni@bedevere-bot