Reduce overhead of pushing and popping frames in Python-to-Python calls. · Issue #93897 · python/cpython (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@markshannon

Description

@markshannon

The cost of pushing a frame for Python-to-Python calls is much lower than it used to be, but still considerably higher than it could be.

Pushing a frame should be little more than a space check and a pointer bump. Similarly popping the frame, should just be a pointer adjustment.

We want to be able to add "shim" and proxy frames for performance and debugging. To be able to do that, the cost of frame popping and pushing should be as low as possible.