python / cpython

The Python programming language
https://www.python.org
Other
62.17k stars 29.88k forks source link

Improve the efficiency of trace stitching #122294

Open brandtbucher opened 1 month ago

brandtbucher commented 1 month ago

From the way benchmarks have been responding to recent PRs, it certainly seems like side exits could be made more efficient, especially in the happy path. This is especially true of _DYNAMIC_EXIT, which needs to do quite a bit of work for a successful stitch... perhaps the best option here is to just reduce the number of _DYNAMIC_EXITs that we run.

This could also include recompiling stitched traces together into the same executor to essentially remove stitching overhead, too.

Linked PRs

picnixz commented 1 month ago

@brandtbucher Can this one be closed? or is there some remaining work?

brandtbucher commented 1 month ago

No, I think there may be more to do here.

picnixz commented 1 month ago

I'll let you close it yourself then!