Skip to content

gh-118527: Use _Py_ID(__main__) for main module name - #118528

Merged
colesbury merged 1 commit into
python:mainfrom
colesbury:gh-118527-__main__
May 3, 2024
Merged

colesbury merged 1 commit into
python:mainfrom
colesbury:gh-118527-__main__

Conversation

@colesbury

@colesbury colesbury commented May 3, 2024 •

Copy link
Copy Markdown
Contributor

Most module names are interned and immortalized, but the main module's name was not. This partially addresses a scaling bottleneck in the free-threaded when creating closure concurrently in the main module.

Most module names are interned and immortalized, but the `__main__`
module was not. This partially addresses a scaling bottleneck in the
free-threaded when creating closure concurrently in the main module.

@corona10 corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@colesbury
colesbury merged commit 24e643d into python:main May 3, 2024
@colesbury
colesbury deleted the gh-118527-__main__ branch May 3, 2024 15:05
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
…118528)

Most module names are interned and immortalized, but the main
module was not. This partially addresses a scaling bottleneck in the
free-threaded when creating closure concurrently in the main module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants