microsoft / microsoft/TypeScript

Use Profile-Guided Optimization (PGO) for the compiler itself

未关闭
#63,774 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Domain: Performance Possible Improvement
主要语言
Go
星标
111k
派生
14.3k
平均合并
2 天 4 小时
30 天内合并 PR
132

描述

Hi!

Since the compiler is to be rewritten in Go, I suggest considering using the Profile-Guided Optimization (PGO) option to optimize the Typescript compiler itself. Go [supports](https://go.dev/doc/pgo) PGO since 1.20 so it's an available option for the project. PGO for compiler-like workloads works especially well - e.g. check my PGO [benchmarks](https://github.com/zamazan4ik/awesome-pgo?tab=readme-ov-file#compilers-and-interpreters) for compilers (even if most of are for non-Go projects, the results should be pretty the same for Go since it uses the same ideas).

I suggest you the following plan:

* Perform PGO benchmarks for the compiler. It will require thinking about the training workload - I think compiling any Typescript project would be a good option for most of the use-cases
* Providing some scripts for simplifying building the compiler with PGO
* Integrating PGO optimization step into the CI pipeline so end-users will get a PGO-optimized version of the compiler.

I understand that the project is in its early-stages and probably there are more important things to finish at the moment. If this is true, just consider the issue as a point of improvement for the future versions. I believe that improving the compiler performance is a valuable-enough things for the end-users.

Thank you.

P.S. If you think that Discussions is a better place for such issues - feel free to move it there.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先审阅 Go 1.20 的 PGO 文档以及编译器当前的构建和 CI 入口点。建立一个具有代表性的 TypeScript 训练工作负载,将 PGO 与基线进行基准测试,并评估 CI 集成是否能带来可测量的收益。该 issue 未指定任何具体文件或测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
go, typescript
领域
ci-cd, compilers, performance
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。