GeezerVison is showing github.com — gh-124153: Remove `_PyType_GetModuleByDef2` private function by neonene · Pull Request #124261 · python/cpython
Conversation
neonene
commented
Sep 20, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Unlike PyType_GetModuleByDef(), this uses PyType_HasFeature() for differentiation.
This will not be inlined, but hopefully 4% faster on Windows PGO. The forceinline version was less efficient (2% faster).
Uh oh!
There was an error while loading. Please reload this page.
PyType_GetModuleByDef() is now slower.
This comment was marked as outdated.
This comment was marked as outdated.
|
Looks like this removes the only call to _PyType_GetModuleByDef2; could you also remove the function?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Looks like this removes the only call to _PyType_GetModuleByDef2; could you also remove the function?
@neonene prepared #124262 but this follow-up PR cannot be merged before the code is updated to no longer call _PyType_GetModuleByDef2 ;-)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
@neonene prepared #124262 but this follow-up PR cannot be merged before the code is updated to no longer call _PyType_GetModuleByDef2 ;-)
I've port the header update from #124262 to here. Is this what you mean?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Why not removing _PyType_GetModuleByDef2() body as well?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
neonene
changed the title
gh-124153: Use Py_tp_token slot and PyType_GetBaseByToken() in a few modules
gh-124153: Remove _PyType_GetModuleByDef2 private function
Sep 24, 2024
|
(Does it really make sense to remove _PyType_GetModuleByDef2() before checking the features on main?)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
To be honest I don't follow too closely the order in which the changes here should be made/merged.
I also have no way to benchmark with MSVC, so I trust you about the performance, and just review for functionality and readability :)
If this removes the last call to _PyType_GetModuleByDef2, and we don't plan to bring the function back, then it should be removed now. If it turns out to be needed again, we can find it in Git history.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|