GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-45885: Don't un-adapt `COMPARE_OP` when collecting stats by brandtbucher · Pull Request #31516 · python/cpython

Conversation

@brandtbucher

@brandtbucher brandtbucher commented Feb 22, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

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
Kind Count Ratio
unquickened 7362156 0.4%
specialization.deferred 288102012 17.2%
specialization.deopt 15642 0.0%
hit 1374191464 82.3%
miss 959440 0.1%

Specialization attempts

Count Ratio
Success 373171 7.4%
Failure 4650804 92.6%
Failure kind Count Ratio
not followed by cond jump 2647332 56.9%
float long 665643 14.3%
set 580212 12.5%
different types 151788 3.3%
bool 137583 3.0%
other 127248 2.7%
tuple 120230 2.6%
big int 101401 2.2%
bytes 52839 1.1%
baseobject 42585 0.9%
list 23036 0.5%
string 706 0.0%
long float 201 0.0%

https://bugs.python.org/issue45885

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
brandtbucher added 3 commits February 22, 2022 15:46
@brandtbucher
Don't deopt COMPARE_OP when collecting stats
c187fa1
@brandtbucher
blurb add
fedbd8c
@brandtbucher
Fix wording
9980743
@brandtbucher
brandtbucher requested review from markshannon and sweeneyde February 22, 2022 23:57
@bedevere-bot bedevere-bot added the awaiting core review label Feb 22, 2022
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Feb 22, 2022
sweeneyde
sweeneyde approved these changes Feb 23, 2022
View reviewed changes

@sweeneyde sweeneyde left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Feb 23, 2022
@markshannon

markshannon commented Feb 23, 2022

Copy link
Copy Markdown
Member

👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon
markshannon merged commit 375a56b into python:main Feb 23, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Feb 23, 2022
@brandtbucher
brandtbucher deleted the compare-op-stats branch July 21, 2022 20:16
@sweeneyde sweeneyde mentioned this pull request Apr 10, 2022
Specialize COMPARE_OP #90043
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sweeneyde sweeneyde sweeneyde approved these changes
@markshannon markshannon Awaiting requested review from markshannon

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@brandtbucher @markshannon @sweeneyde @the-knights-who-say-ni @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.