bpo-45116: Add the Py_ALWAYS_INLINE macro by vstinner · Pull Request #28390 · python/cpython
Conversation
Add the Py_ALWAYS_INLINE macro to ask the compiler to always inline a
static inline function. The compiler can ignore it and decides to not
inline the function.
I decided to split my old PR #28141 in two parts:
- (1) this PR adds the macro
- (2) use the macro on some performance critical static inline functions
Add the Py_ALWAYS_INLINE macro to ask the compiler to always inline a static inline function. The compiler can ignore it and decides to not inline the function.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a What's New entry?
How about a What's New entry?
I don't want to advertise too much this macro :-D As I wrote in its documentation, misusing it can make the code slower.
Also, I'm not even sure if it should be used in Python :-) Benchmarks will give us some hints ;-)
niyas-sait pushed a commit to niyas-sait/cpython that referenced this pull request
neonene
mannequin
mentioned this pull request
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