Skip to content

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