Skip to content

gh-150490: Raise PyType_Modified for insertion into split dictionary#150489

Draft
DinoV wants to merge 1 commit into
python:mainfrom
DinoV:sharedkeys_type
Draft

gh-150490: Raise PyType_Modified for insertion into split dictionary#150489
DinoV wants to merge 1 commit into
python:mainfrom
DinoV:sharedkeys_type

Conversation

@DinoV
Copy link
Copy Markdown
Contributor

@DinoV DinoV commented May 26, 2026

When we insert into a split dictionary we update the shared keys version - this is used to invalidate caches for loading methods and loading class values and requires us to check the keys version. Instead we can raise PyType_Modified which lets us rely on the type version check + has inline values check instead of validating that we have the correct keys version. This gets rid of loading the cached keys version, the objects type (although likely the compiler eliminates this already), loading the cached keys from the type, and then loading the keys version and comparing it against the cached value.

@DinoV DinoV changed the title Raise PyType_Modified for insertion into split dictionary gh-150490: Raise PyType_Modified for insertion into split dictionary May 26, 2026
@DinoV DinoV force-pushed the sharedkeys_type branch 4 times, most recently from a581fbd to 226cf29 Compare May 26, 2026 19:04
@DinoV DinoV force-pushed the sharedkeys_type branch from 226cf29 to 8406f6f Compare May 26, 2026 20:17
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.

1 participant