FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-126599: Remove the `PyOptimizer` API by brandtbucher · Pull Request #129194 · python/cpython · GitHub

/ cpython Public

GH-126599: Remove the PyOptimizer API - #129194

Merged
brandtbucher merged 5 commits into
python:mainfrom
brandtbucher:remove-optimizer-api
Jan 29, 2025
Merged

GH-126599: Remove the PyOptimizer API#129194
brandtbucher merged 5 commits into
python:mainfrom
brandtbucher:remove-optimizer-api

Conversation

brandtbucher commented Jan 22, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

The first commit removes the PyOptimizer API, which also nicely removes the ability to toggle the JIT on or off at runtime. The second commit "specializes" JUMP_BACKWARD so that we don't constantly check whether the JIT is enabled on backedges.

This should be covered by the NEWS entry from GH-126853.

Comment thread Python/bytecodes.c Outdated
tier1 op(_SPECIALIZE_JUMP_BACKWARD, (--)) {
#if ENABLE_SPECIALIZATION
if (this_instr->op.code == JUMP_BACKWARD) {
if (tstate->interp->jit) {

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
if (tstate->interp->jit) {
this_instr->op.code = (tstate->interp->jit) ? JUMP_BACKWARD_JIT : JUMP_BACKWARD_NO_JIT;

markshannon 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good.
_SPECIALIZE_JUMP_BACKWARD looks oddly asymmetric, though.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs) skip news topic-JIT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL