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:
- 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.
- 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
Feature or enhancement
Proposal:
To maximize traces executed, we should also trace from
RESUMEin the JIT.Some things I learnt along the way of implementing this:
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.Edit: 3. Mark found that maybe it's not worth tracing from RESUME for generators/async generators/coroutines.
Linked PRs