Skip to content

Add JIT utilities in sys._jit #133231

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
brandtbucher opened this issue May 1, 2025 · 0 comments
Open

Add JIT utilities in sys._jit #133231

brandtbucher opened this issue May 1, 2025 · 0 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-JIT type-feature A feature request or enhancement

Comments

@brandtbucher
Copy link
Member

brandtbucher commented May 1, 2025

Feature or enhancement

...as discussed in https://discuss.python.org/t/an-api-for-controlling-and-introspecting-the-jit/73356. This will include (for 3.14):

  • sys._jit.is_available() -> bool: Return True if the current Python executable supports JIT compilation, and False otherwise.
  • sys._jit.is_enabled() -> bool: Return True if JIT compilation is enabled for the current Python process (implies sys._jit.is_available()), and False otherwise.
  • sys._jit.is_active() -> bool: Return True if the topmost Python frame is currently executing JIT code, and False otherwise.

Linked PRs

@brandtbucher brandtbucher added interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-JIT type-feature A feature request or enhancement labels May 1, 2025
@brandtbucher brandtbucher self-assigned this May 1, 2025
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) topic-JIT type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant