Grand unified tail-calling
Open
@Fidget-Spinner is already working on this.
Since Feb 7, 2025.
interpreter-core
topic-JIT
type-feature
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Feature or enhancement
Proposal:
We have a tail calling interpreter. I now propose to tightly couple that with the JIT, so we can tail call into the JIT and tail call out of it.
This has a few benefits:
- No more C stack consumption by the JIT.
- Much more efficient entry and exit of jitted code. OSR entry is just a single indirect jump.
We need to align the calling convention of the JIT and the tail calling interpreter. This will need careful benchmarking to make sure we don't regress JIT performance.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
- gh-129820
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.