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

Excessive numbers ofDEOPT_IFs in bytecodes.c #145692

Open
Labels
3.15new features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagetopic-JIT
@markshannon

Description

@markshannon

In the specializing adatpive interpreter,DEOPT_IFs andEXIT_IFs are synonymous, so we have historically been quite haphazard about which to use.
In the JIT, however, there is an important difference: aDEOPT_IF drops execution back into the interpreter unconditionally, whereas anEXIT_IF causes a side-exit which can warm up and also be jitted.

In some cases, like in aCALL or aSEND, theDEOPT_IF prevents the code from being ever being jitted after the exit. See#145047 for an explanation.

There are currently 109DEOPT_IFs in bytecodes.c. Many of those should beEXIT_IFs.

Specifically,DEOPT_IFs should be converted toEXIT_IFs if they are:

  • In a guard (e.g._GUARD_CALLABLE_STR_1)
  • In the guard part of a more complex uop (e.g._CHECK_AND_ALLOCATE_OBJECT)

DEOPT_IFs should be left alone if any of these are true:

  • It is in teir1-only code
  • It is an error, and we are exiting to let the interpeter handle the error
  • The interpreter needs to handle something before continuing in jitted code (e.g the eval breaker)
  • An optimization is no longer valid and re-specialization/jitting needs to happen

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15new features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagetopic-JIT

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp