Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-46841: Improve the failure stats forCOMPARE_OP#31663

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

brandtbucher
Copy link
Member

@brandtbucherbrandtbucher commentedMar 3, 2022
edited by bedevere-bot
Loading

With the move to inline caching, jumps are getting a bit longer. This adds new category ofCOMPARE_OP failures for the (increasingly more common) case where aCOMPARE_OP instruction is followed by anEXTENDED_ARG.

New stats for a fullpyperformance run:

KindCountRatio
unquickened73487390.4%
specialization.deferred35937104821.7%
specialization.deopt157300.0%
hit128921097577.8%
miss9430570.1%

Specialization attempts

CountRatio
Success2890834.8%
Failure572338695.2%
Failure kindCountRatio
extended arg247317443.2%
not followed by cond jump125861222.0%
float long67168211.7%
set57924110.1%
different types1655392.9%
bool1370382.4%
tuple1196322.1%
other1155662.0%
big int955471.7%
bytes464810.8%
baseobject373350.7%
list226340.4%
string7040.0%
long float2010.0%

https://bugs.python.org/issue46841

Copy link
Member

@sweeneydesweeneyde left a comment
edited
Loading

Choose a reason for hiding this comment

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

Looks good.

We could also consider packing extended opargs into the top 13 bits ofcache->mask when it fits there.

Edit: I suppose it would be difficult to do next_instr++ the correct number of times in ceval. Store how far to jump ahead for that branch as well?

@brandtbucher
Copy link
MemberAuthor

@markshannon is already brainstorming ideas for how to tackle the general problem of longer jumps infaster-cpython/ideas#297 andfaster-cpython/ideas#301. We should probably wait to see how that pans out first before adding a bunch of new logic to the differentCOMPARE_OP specializations.

@brandtbucherbrandtbucher merged commit127797f intopython:mainMar 3, 2022
@markshannon
Copy link
Member

Feel free to add suggestions tofaster-cpython/ideas#301.

faster-cpython/ideas#297 is more about giving the bytecode compiler freedom to lay out basic blocks.

@brandtbucherbrandtbucher deleted the more-compare-op-stats branchJuly 21, 2022 19:53
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@sweeneydesweeneydesweeneyde approved these changes

@markshannonmarkshannonAwaiting requested review from markshannon

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

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

[8]ページ先頭

©2009-2025 Movatter.jp