GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-131798: do not watch immutable types in JIT by kumaraditya303 · Pull Request #148383 · python/cpython

Conversation

@kumaraditya303

@kumaraditya303 kumaraditya303 commented Apr 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: Better uop coverage in the JIT optimizer #131798

Immutable types cannot change so there is no need to add type watcher to them and add it to bloom filter. This reduces the false positive from bloom filters.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kumaraditya303
do not watch immutable types in JIT
eec3dcd
@kumaraditya303 kumaraditya303 added the skip news label Apr 11, 2026
@kumaraditya303
kumaraditya303 requested review from Fidget-Spinner, markshannon, savannahostrowski and tomasr8 as code owners April 11, 2026 13:52
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 11, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Apr 11, 2026
Better uop coverage in the JIT optimizer #131798
Open
kumaraditya303
kumaraditya303 commented Apr 11, 2026
View reviewed changes
Comment thread Python/optimizer_analysis.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@kumaraditya303
add comment
35dfa53
cocolato
cocolato approved these changes Apr 11, 2026
View reviewed changes
@Fidget-Spinner

Fidget-Spinner commented Apr 11, 2026

Copy link
Copy Markdown
Member

I just merged a PR that watches more types 1c89817 I assume those don't need to be checked, as immutable types usually have no __init__ and STORE_ATTR_INSTANCE_VALUE? Though I may be wrong.

Also can you edit your PR description to explain why (e.g. reduce the chance of false positive in bloom filter).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kumaraditya303

kumaraditya303 commented Apr 11, 2026

Copy link
Copy Markdown
Contributor Author

I assume those don't need to be checked, as immutable types usually have no init and STORE_ATTR_INSTANCE_VALUE? Though I may be wrong.

Immutable types does not mean that the object is immutable too, like dict so it can have __init__.

Also can you edit your PR description to explain why (e.g. reduce the chance of false positive in bloom filter).

Edited.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fidget-Spinner

Fidget-Spinner commented Apr 11, 2026

Copy link
Copy Markdown
Member

Oh ok. In that case, please pull in main and do the same then. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kumaraditya303 added 2 commits April 11, 2026 20:44
@kumaraditya303
Merge branch 'main' of https://github.com/python/cpython into jit-bloom
ab5a85d
@kumaraditya303
do the same for _GUARD_TYPE_VERSION_LOCKED
4a67422
Fidget-Spinner
Fidget-Spinner approved these changes Apr 11, 2026
View reviewed changes

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Apr 11, 2026
@kumaraditya303
kumaraditya303 enabled auto-merge (squash) April 11, 2026 15:18
@kumaraditya303
kumaraditya303 merged commit ba1e1c1 into python:main Apr 11, 2026
73 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 11, 2026
@kumaraditya303
kumaraditya303 deleted the jit-bloom branch April 11, 2026 15:57
@kumaraditya303 kumaraditya303 added the topic-JIT label Apr 11, 2026
@Fidget-Spinner Fidget-Spinner mentioned this pull request Apr 12, 2026
gh-148398: add type watcher in _CHECK_ATTR_CLASS #148399
Merged
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@kumaraditya303 @ljfp
pythongh-131798: do not watch immutable types in JIT (python#148383)
9ecd501
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz left review comments
@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes
@cocolato cocolato cocolato approved these changes
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner
@tomasr8 tomasr8 Awaiting requested review from tomasr8 tomasr8 is a code owner
@savannahostrowski savannahostrowski Awaiting requested review from savannahostrowski

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news topic-JIT

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@kumaraditya303 @Fidget-Spinner @picnixz @cocolato
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.