Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-43563 : Introduce dedicated opcodes for super calls#24936

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
vladima wants to merge3 commits intopython:mainfromvladima:super_call

Conversation

vladima
Copy link
Contributor

@vladimavladima commentedMar 19, 2021
edited by bedevere-bot
Loading

AddLOAD_METHOD_SUPER andLOAD_ATTR_SUPER opcodes to optimize method calls and attribute lookups when receiver issuper().

https://bugs.python.org/issue43563

@gvanrossum
Copy link
Member

See question on bpo -- why is this important? Do you have performance data to back up that this is an important optimization?

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelApr 22, 2021
@gvanrossum
Copy link
Member

Unless you come up with some benchmark numbers, unfortunately we will have to close this PR. I'll give you a week to let us know what you'd like to do. If you need more time to benchmark, just let us know -- but if we don't hear from you after a week we'll close it. If you change your mind later or you're on vacation or something like that, I will still be notified of comments added to the issue after it's closed, so don't hesitate to say something!

@github-actionsgithub-actionsbot removed the staleStale PR or inactive for long period of time. labelApr 25, 2021
@markshannon
Copy link
Member

I'm interested to see how this compares with adaptive specialization of PEP 659.

The expressionsuper().attr compiles with this PR as:

          LOAD_DEREF               0 (__class__)          LOAD_FAST                  0 (self)          LOAD_ATTR_SUPER   1 ((1, True))

on main this compiles as:

         CALL_FUNCTION            0         LOAD_ATTR                1 (attr)

So main has a (small) advantage in dispatching.
The question is, can a specialized form ofCALL_FUNCTION 0; LOAD_ATTR match the custom opcodes.

Assuming we specialize bothCALL_FUNCTION andLOAD_ATTR I think it can.
There will be the overhead of creating thesuper() object, but the specializer has more context than the static compiler and should be able to do a much better job on the attribute lookup.

@carljm
Copy link
Member

This is superseded by#103497.

@carljmcarljm closed thisApr 13, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

7 participants
@vladima@gvanrossum@markshannon@carljm@the-knights-who-say-ni@ezio-melotti@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp