microsoft / microsoft/TypeScript

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

Abierto
#63,774 5 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Domain: Performance Possible Improvement
Lenguaje dominante
Go
Estrellas
111k
Forks
14.3k
Merge medio
2 d 4 h
PR fusionados (30 d)
132

Descripción

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 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 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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza revisando la documentación de PGO de Go 1.20 y los puntos de entrada actuales del compilador para build y CI. Establece una carga de trabajo de entrenamiento representativa de TypeScript, compara PGO con la línea base y evalúa si la integración con CI produce un beneficio medible. El issue no especifica archivos ni pruebas concretos.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
go, typescript
Área
ci-cd, compilers, performance
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.