-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Near zero-cost super().meth() calls via adaptive superinstructions #90722
Comments
Credit for 1. and 2. doesn't belong to me. Those were inspired by the excellent work done in bpo-43563. I'll do this by combining the adjacent CALL (super) and LOAD_METHOD instructions into CALL_NO_KW_SUPER__LOAD_METHOD. Using the specializer means:
The final 2-argument super(type, obj).meth() form will have almost no overhead over a corresponding self.meth() call in the current implementation. Please see faster-cpython/ideas#242 and faster-cpython/ideas#239 for more info. |
I was reading typeobject.c and noticed that creating a super object currently requires creating a frame object which is created lazily and is slow and it would work with the InterpreterFrame as well so I created a PR for this optimization and now it does not requires creating frame objects. |
@Kumar, my PR already has your changes. |
Oh, I didn't see your PR and commented as it was not mentioned in this bpo. Would you like to split the PR or continue with yours, either way is fine? |
No problem. In the future please check the "Pull Requests" section on the issue. People don't always say "I created a PR at xxx". Often times we just link the PR into the issue itself. Keep your PR around in case mine gets rejected, then we can take just the good parts. If mine's accepted, we can close yours. |
Superseded by #87729. |
super().meth()
calls via adaptive superinstructions #30992Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: