Skip to content
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

bpo-45256: Don't call at the C level when calling bound-methods from Python code. #29238

Merged
merged 1 commit into from
Oct 27, 2021

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Oct 27, 2021

Unpacks bound methods on to the stack before doing check to see if call can be inlined.

This PR is not about performance, but making the behavior of x.m() and t = x.m; t() the same in terms of stack consumption.

Performance is fine though.

https://bugs.python.org/issue45256

@gvanrossum gvanrossum changed the title bpo-45256: Don't calls at the C level when calling bound-methods from Python code. bpo-45256: Don't call at the C level when calling bound-methods from Python code. Oct 27, 2021
@markshannon markshannon merged commit 4776b07 into python:main Oct 27, 2021
@markshannon markshannon deleted the handle-bound-methods branch September 26, 2023 12:51
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.

4 participants