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

gh-134728: Don't deopt due to eval breaker in_TIER2_RESUME_CHECK#134729

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

Open
Fidget-Spinner wants to merge3 commits intopython:main
base:main
Choose a base branch
Loading
fromFidget-Spinner:tier2_resume_check

Conversation

Fidget-Spinner
Copy link
Member

@Fidget-SpinnerFidget-Spinner commentedMay 26, 2025
edited
Loading

On this benchmark (unscientific, noisy)https://gricad-gitlab.univ-grenoble-alpes.fr/augierpi/augierpi.gricad-pages.univ-grenoble-alpes.fr/-/blob/branch/default/content/docs/2025/about-py-jit/bench_loops_sum.py, I get the following results:

Before:Number of long_calcul per second: 76.45 ± 1.19After:Number of long_calcul per second: 83.88 ± 10.10

So nearly a 10% improvement!

Copy link
Member

@tomasr8tomasr8 left a comment

Choose a reason for hiding this comment

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

Thanks for the review request! I have two comments :)

Comment on lines +5403 to +5406
if (eval_breaker & _PY_EVAL_EVENTS_MASK) {
int err = _Py_HandlePending(tstate);
ERROR_IF(err != 0);
}
Copy link
Member

Choose a reason for hiding this comment

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

Just throwing this out there since I don't yet know enough about these specific instructions, but with this change,
_TIER2_RESUME_CHECK is now looking quite similar to_CHECK_PERIODIC. Is there any way we can combine them? Or do we need to keep them separate?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Possibly could replace _TIER2_RESUME_CHECK with _CHECK_PERIODIC.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ok I think maybe not, the assertions in TIER2_RESUME_CHECK are different.

tomasr8 reacted with thumbs up emoji
Copy link
Member

@tomasr8tomasr8 left a comment

Choose a reason for hiding this comment

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

Again, I don't fully understand this part so my approval doesn't count for much, but the changes look good to me, judging by what we have in_CHECK_PERIODIC and_CHECK_PERIODIC_IF_NOT_YIELD_FROM :)

Btw, Mark left a comment on the issue:#134728 (comment), not sure if you've seen it.

Fidget-Spinner reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tomasr8tomasr8tomasr8 approved these changes

@brandtbucherbrandtbucherAwaiting requested review from brandtbucher

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Fidget-Spinner@tomasr8

[8]ページ先頭

©2009-2025 Movatter.jp