Skip to content

gh-131798: Propagate iterator types from GET_ITER in the JIT - #157011

Open
lgeiger wants to merge 1 commit into
python:mainfrom
lgeiger:jit-dict-set-iter
Open

gh-131798: Propagate iterator types from GET_ITER in the JIT#157011
lgeiger wants to merge 1 commit into
python:mainfrom
lgeiger:jit-dict-set-iter

Conversation

@lgeiger

@lgeiger lgeiger commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

This PR propagates the iterator result types for dicts and sets in the jit optimiser.
This removes a _GUARD_TYPE_ITERguard when GET_ITER and FOR_ITER are in the same trace.

I ran a small microbenchmark on macOS aarch64 that repeatedly iterated over small dictionaries and sets: it seems like this change shows up a 1% improvement, but results are very noisy.

@Fidget-Spinner

Copy link
Copy Markdown
Member

Sorry, all JIT development is currently paused until a PEP is accepted by the steering council. You can search the Python Discourse to learn more!

@lgeiger

lgeiger commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, all JIT development is currently paused until a PEP is accepted by the steering council. You can search the Python Discourse to learn more!

OK, sorry. Wasn't aware.

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.

2 participants