Skip to content

Conversation

BobTheBuidler
Copy link
Contributor

@BobTheBuidler BobTheBuidler commented Oct 3, 2025

This PR adds a CPyDict_GetItemUnsafe op which can only be used on exact dict instances, and uses it to get items from module dicts and the globals dict.

I broke this out of #19499 because it doesn't depend on the exact_dict_rprimitive PR #19677 being merged beforehand. (could I ask you to look at that one next actually? Once its merged it unblocks me on the rest of the exact_dict optimizations)

This PR is ready for review.

@BobTheBuidler BobTheBuidler changed the title [mypyc] feat: use exact dict getitem op for module dict lookup [mypyc] feat: use exact dict getitem op for module dict lookup [1/1] Oct 3, 2025
@BobTheBuidler BobTheBuidler force-pushed the exact-dict-getitem-op branch from bfd77b8 to d8d25e0 Compare October 3, 2025 20:25
@BobTheBuidler BobTheBuidler marked this pull request as ready for review October 3, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant