Compiling executors can result in excessively large amounts of machine code.
未关闭
还没有人认领这个 Issue。
interpreter-core
performance
topic-JIT
type-feature
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定源文件、测试或入口点。首先查看已链接的 PR gh-142228、gh-142263、gh-142257、gh-142386 和 gh-142409,了解它们涉及已编译执行器和 DECREF_INPUTS() 的哪些部分。完成的标准是在不改变执行器行为的情况下减小机器码大小,并且相关测试或基准测试通过。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- compilers, performance
- Issue 类型
- 缺陷
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 20/100