Compiling executors can result in excessively large amounts of machine code.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
With the tracing front-end to the JIT we are producing longer traces than before.
This should be good, but results in very large chunks of machine code.
Large chunks of machine code are bad because:
- It takes longer and uses more memory
- It puts a lot of pressure on the icache, possibly evicting the interpreter
- It makes handling of inline data and branches less efficient as the targets are further away.
To be clear, the problem is not the number of uops per trace, but the amount of machine code per uop.
Things we can do to fix this:
- Move code into helper functions for the larger uops
- Move complex decref sequences for
DECREF_INPUTS()into helper functions.
(We can also do more optimizations to remove more uops, but that's a separate issue and we're doing it anyway)
Linked PRs
- gh-142228
- gh-142263
- gh-142257
- gh-142386
- gh-142409
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.
Research direction
No source files, tests, or entry points are named. Start by reviewing linked PRs gh-142228, gh-142263, gh-142257, gh-142386, and gh-142409 to see which parts of compiled executors and DECREF_INPUTS() they address. Done means reducing machine-code size without changing executor behavior, with relevant tests or benchmarks passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100