Skip to content

Trace starting from RESUME in the JIT #127958

@Fidget-Spinner

Description

@Fidget-Spinner

Feature or enhancement

Proposal:

To maximize traces executed, we should also trace from RESUME in the JIT.

Some things I learnt along the way of implementing this:

  1. We want a threshold for functions more than JUMP_BACKWARDS. Thanks to correspondence from CF Bolz-Tereick, I learnt that PyPy sets function warmup to be 60% higher than loop warmup. IIRC, Luajit sets it to 2x. I chose 2x. This number could use further investigation.
  2. We need to trace into function executors too, to avoid shortening the length of loop traces.

Edit: 3. Mark found that maybe it's not worth tracing from RESUME for generators/async generators/coroutines.

Linked PRs

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions