◐ Shell
reader mode source ↗
Skip to content

GH-91095: Specialize calls to normal python classes#93221

Closed
markshannon wants to merge 36 commits into
python:mainfrom
faster-cpython:specialize-calls-to-normal-python-classes
Closed

GH-91095: Specialize calls to normal python classes#93221
markshannon wants to merge 36 commits into
python:mainfrom
faster-cpython:specialize-calls-to-normal-python-classes

Conversation

@markshannon

@markshannon markshannon commented May 25, 2022

Copy link
Copy Markdown
Member

@Fidget-Spinner Fidget-Spinner 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.

Hide comment

I get the rough idea of this, and to save some time for the other reviewers, here's how it goes:

Frames before a Python class instantiation
__main__ -> NULL

Frames when a Python class is instantiated:
__main__ -> shim -> __init__ -> NULL
(Shim is responsible for replacing None returned by __init__ with self. It contains a special instruction EXIT_INIT_CHECK to verify the None.)

I'm not confident that I can catch any subtle errors with this much code. Let's test this with buildbots.

@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 27, 2022
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @markshannon for commit e70711a 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 27, 2022
@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 27, 2022
6 hidden items Load more…

@Fidget-Spinner Fidget-Spinner 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.

Hide comment

The code LGTM. But whether the perf improvement is worth the +300 lines of code I don't feel so sure. You'll have to decide that for yourself.

@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 7, 2022
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @markshannon for commit b75b1aa 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 7, 2022
@markshannon

Copy link
Copy Markdown
Member Author

There were too many conflicts after the many changes to the interpreter.
Closing in favour of #99331

@markshannon markshannon deleted the specialize-calls-to-normal-python-classes branch September 26, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants