Improving trace quality by tracking "fitness" and "exit quality"
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Feature or enhancement
Proposal:
The performance of the JIT depends heavily on the quality of the traces that the front-end produces. If traces are too short, very long, overlap a lot, or drop into the interpreter too often, performance suffers.
To avoid those cases of poor performance, we should track two values during tracing:
- The fitness of the current trace
- The quality of the end of the trace as a point to stop the trace.
If fitness < exit_quality we should stop the trace.
Fitness:
Fitness should:
- start high
- be reduced by branches, how much depending on the bias of branch
- be reduced (by quite a lot) by backward edges
- be reduced a small amount by each instruction (to discourage excessively long traces)
- start lower for non-branch side exits to reduce code replication
Exit quality
Exit quality should be high for:
- The starting point of the trace (very high for this)
ENTER_EXECUTORinstructions- Merge points in the control flow graph (will need the bytecode compiler to generate this data)
Exit quality should be low for:
- Specializable instructions
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
- gh-147966
- gh-148082
- gh-148089
- gh-148301
- gh-148840
- gh-148959
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza revisando los criterios de fitness y calidad de salida de la propuesta y, después, examina los PRs enlazados gh-147966, gh-148082, gh-148089, gh-148301, gh-148840 y gh-148959. El trabajo estará terminado cuando el trazado se detenga cuando el fitness quede por debajo de la calidad de salida y estén cubiertos los comportamientos de trace, branch, backward-edge, instruction y merge-point indicados.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- 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
- 25/100