-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
bpo-46939: Specialize calls to Python classes #31707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Fidget-Spinner
wants to merge
16
commits into
python:main
from
Fidget-Spinner:specialize_py_class_calls
Closed
Changes from 2 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
43112e0
Specialize calls to Python classes
Fidget-Spinner 09a7180
Add news
Fidget-Spinner d74d294
Fix segfaults, refleaks, readjust sys tests size
Fidget-Spinner 0583f6b
fix refleak on frame exit due to exception
Fidget-Spinner bb78e9c
Use non-function pointer since it's faster
Fidget-Spinner b570e92
Address Jelle's review (use vectorcall for new)
Fidget-Spinner efad70f
Address Mark's reviews (remove func version check)
Fidget-Spinner 4d6a06b
Use a macro for passing self
Fidget-Spinner 5b526af
Merge remote-tracking branch 'upstream/main' into specialize_py_class…
Fidget-Spinner de3a406
Use inline caching
Fidget-Spinner 30a0659
Regenerate frozenmain
Fidget-Spinner db09eef
Fix test_dis
Fidget-Spinner 0d7f59e
Merge remote-tracking branch 'upstream/main' into specialize_py_class…
Fidget-Spinner 28f9dbb
Drop generators from specialization
Fidget-Spinner d11362f
Merge branch 'main' of https://github.com/python/cpython into special…
Fidget-Spinner c04f5da
Use _Py_SET_OPCODE
Fidget-Spinner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Core and Builtins/2022-03-06-21-50-36.bpo-46939.nlQEGG.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Calls to Python classes are now specialized. Creating objects from Python | ||
classes should now be faster. Patch by Ken Jin. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Note to reviewers: tied to frame state instead of some cache/call_shape so that subsequent nested calls don't destroy
self
(and we can identify which frame theself
belongs to). Consider the following code: