python / python/cpython

Improve the efficiency of trace stitching

Open
#122,294 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.14 interpreter-core performance
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

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
  • gh-122295

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name files or tests. Start by examining benchmark responses and the trace-stitching path around _DYNAMIC_EXIT; determine whether reducing dynamic exits or recompiling stitched traces is viable. Done means demonstrating lower stitching overhead on the relevant benchmarks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.