Skip to content

gh-132336: Only mark slow path functions used by the interpreter loop as noinline in free-threaded builds #132424

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mpage
Copy link
Contributor

@mpage mpage commented Apr 12, 2025

There is concern that this is slowing down the default build.

…e in free-threaded builds

There is concern that this is slowing down the default build.
@@ -374,6 +374,14 @@ extern "C" {
# define Py_NO_INLINE
#endif

// FT_NO_INLINE
// Disable inlining of a function only in the free-threaded build.
#if defined(Py_GIL_DISABLED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Referring to Marks comment #132336 (comment)

What we do or do not want to inline depends on whether it is a tail-calling build or not.

this should maybe depend on tail-calling, too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark results suggest that it doesn't matter.

@chris-eibl chris-eibl added topic-free-threading performance Performance or resource usage interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Apr 12, 2025
@mpage mpage requested a review from Yhg1s April 12, 2025 06:54
@mpage mpage marked this pull request as ready for review April 12, 2025 06:54
@mpage mpage requested a review from markshannon as a code owner April 12, 2025 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage skip news topic-free-threading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants