8000 bpo-45116: Add the Py_ALWAYS_INLINE macro by vstinner · Pull Request #28390 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45116: Add the Py_ALWAYS_INLINE macro #28390

8000
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

Merged
merged 3 commits into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rephrase the doc
  • Loading branch information
vstinner committed Sep 16, 2021
commit fa020c890a68c142bdfda1f4824ce697e4124fb1
5 changes: 2 additions & 3 deletions Doc/c-api/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ complete listing.
Ask the compiler to always inline a static inline function. The compiler can
ignore it and decides to not inline the function.

This attribute can be used to avoid increasing the stack memory usage when
It can be used to inline performance critical static inline functions when
building Python in debug mode with function inlining disabled. For example,
MSC disables function inlining when building in debug mode. It should be
used on the most commonly used static inline functions.
MSC disables function inlining when building in debug mode.

Marking blindly a static inline function with Py_ALWAYS_INLINE can result in
worse performances (due to increased code size for example). The compiler is
Expand Down
5 changes: 2 additions & 3 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,9 @@ extern "C" {
// Ask the compiler to always inline a static inline function. The compiler can
// ignore it and decides to not inline the function.
//
// This attribute can be used to avoid increasing the stack memory usage when
// It can be used to inline performance critical static inline functions when
// building Python in debug mode with function inlining disabled. For example,
// MSC disables function inlining when building in debug mode. It should be
// used on the most commonly used static inline functions.
// MSC disables function inlining when building in debug mode.
//
// Marking blindly a static inline function with Py_ALWAYS_INLINE can result in
// worse performances (due to increased code size for example). The compiler is
Expand Down
0