Skip to content

gh-131798: do not watch immutable types in JIT#148383

Merged
kumaraditya303 merged 4 commits intopython:mainfrom
kumaraditya303:jit-bloom
Apr 11, 2026
Merged

gh-131798: do not watch immutable types in JIT#148383
kumaraditya303 merged 4 commits intopython:mainfrom
kumaraditya303:jit-bloom

Conversation

@kumaraditya303
Copy link
Copy Markdown
Contributor

@kumaraditya303 kumaraditya303 commented Apr 11, 2026

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.

@Fidget-Spinner
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).

@kumaraditya303
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.

@Fidget-Spinner
Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

Thanks!

@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
@kumaraditya303 kumaraditya303 deleted the jit-bloom branch April 11, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants