-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
gh-89279: In ceval.c, redefine some macros for speed #32387
Merged
Merged
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
0be9d62
TEMPORARY hacks to show inline decisions
gvanrossum abd9118
In ceval.c, redefine some macros for speed
gvanrossum 1724056
Merge remote-tracking branch 'origin/main' into inline
gvanrossum 50e3d7b
Victor's review
gvanrossum 59da3bf
Merge branch 'python:main' into inline
gvanrossum ab6660e
Add _Py_atomic_load_32bit_impl and use cast macro
gvanrossum ae6b53c
Move _Py_atomic_load_32bit_impl out of '#if'
gvanrossum 01cff81
Go back to full PGO test suite
gvanrossum 69da380
Longer comment; improve _Py_atomic_load_relaxed
gvanrossum 2894f6e
Only specialize atomic-load-relaxed if MSC
gvanrossum 4b70976
Try _Py_atomic_load_relaxed_int32
gvanrossum 5617fcd
MSC is better off with the default Py_UNREACHABLE()
gvanrossum a901b91
Update bpo numbers to GH issue numbers
gvanrossum cceb531
Split accidentally merged lines
gvanrossum 26e8107
Delete temporary /d2inlinelogfull option
gvanrossum 11084c0
Merge branch 'main' into inline
gvanrossum b7dfcdc
📜🤖 Added by blurb_it.
blurb-it[bot] 9a5c57c
Use static_assert() in _Py_atomic_load_relaxed_int32
gvanrossum a8cba6e
Revert "MSC is better off with the default Py_UNREACHABLE()"
gvanrossum c43ec56
Add comment referring to GH-89279 for is_method()
gvanrossum 9a15194
static_assert() is only a C++ feature
gvanrossum 5c992d2
Merge remote-tracking branch 'origin/main' into inline
gvanrossum 7b342e4
Also redefine _Py_DECREF_SPECIALIZED as a macro
gvanrossum 3b21c52
Reformat macros for readability
gvanrossum 41cb067
Try to silence warnings
gvanrossum 87aaf81
Update Python/ceval.c
vstinner 3508f45
Update Python/ceval.c
vstinner 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
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Core and Builtins/2022-04-13-22-03-04.gh-issue-89279.-jAVxZ.rst
This file contains 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 @@ | ||
Improve interpreter performance on Windows by inlining a few specific macros. |
This file contains 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.
if only MSVC is affected, only redefine these macros for MSVC, no?
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.
I prefer us running the same code on all platforms if possible, so that it's less likely that someone accidentally breaks the Windows version by want appears to be an innocent change on Linux.
(I have to make an exception for load_relaxed because it is heavily platform-specific.)
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.
To be extra safe, you may also check Py_REF_DEBUG, even if Py_REF_DEBUG should not be defined if Py_DEBUG is defined.
Or maybe object.h should fail with
#error
with Py_REF_DEBUG is defined whereas Py_DEBUG is not.