◐ Shell
reader mode source ↗
Skip to content

bpo-36616: optimize handling of thread state in function call code#12839

Closed
jdemeyer wants to merge 1 commit into
python:masterfrom
jdemeyer:bpo36616
Closed

bpo-36616: optimize handling of thread state in function call code#12839
jdemeyer wants to merge 1 commit into
python:masterfrom
jdemeyer:bpo36616

Conversation

@jdemeyer

@jdemeyer jdemeyer commented Apr 15, 2019

Copy link
Copy Markdown
Contributor

Thanks to @markshannon for the idea.

This does various micro-optimizations for function calls in the bytecode interpreter to give a small increase in performance.

https://bugs.python.org/issue36616

@jdemeyer jdemeyer changed the title Optimize handling of thread state in function call code Apr 15, 2019

@scoder scoder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

I'd say, why not, but would also like to see at least some timings.

@jdemeyer

Copy link
Copy Markdown
Contributor Author

I did some more extensive benchmarks today and I'm no longer convinced that this actually improves anything. In any case, the gain would be very close to the measurement error and not significant.

Parts of this could still make sense as a "clean up" patch, for example the strange assignment of stack_pointer around call_function(). But I don't want to fight that battle, so I'll just close this.

@vstinner

Copy link
Copy Markdown
Member

See also my PR #12934.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants