Evaluate using Profile-Guided Optimization (PGO) and LLVM BOLT

Aberta
#1,077 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
25/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
rust
Domínio
performance

Direção de pesquisa

Start by reading the Rust project's build and benchmark setup, then evaluate PGO with cargo-pgo using representative Rust-Code-Analysis workloads. Compare performance before and after PGO, and investigate LLVM BOLT only after assessing PGO. The issue proposes documenting measured improvements, adding an optional PGO build path, and optimizing prebuilt binaries; agree on scope and report reproducible results.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement

Hi!

Recently I checked Profile-Guided Optimization (PGO) improvements on multiple projects. The results are here. E.g. PGO results for LLVM-related tooling are here. According to the tests, PGO usually helps with the compiler and compiler-like workloads (like static analysis) - e.g. Clang gets +20% compilation speed with PGO. That's why I think trying to optimize the Rust-Code-Analysis tool with PGO can be a good idea.

I can suggest the following action points:

  • Perform PGO benchmarks on Rust-Code-Analysis. And if it shows improvements - add a note about possible improvements in Rust-Code-Analysis's tool performance with PGO.
  • Providing an easier way (e.g. a build option) to build scripts with PGO can be helpful for the end-users and maintainers since they will be able to optimize the Rust-Code-Analysis tool according to their own workloads.
  • Optimize pre-built binaries

Testing Post-Link Optimization techniques (like LLVM BOLT) would be interesting too (Clang and Rustc already use BOLT as an addition to PGO) but I recommend starting from the usual PGO.

I recommend trying to use PGO with cargo-pgo for the Rust code.

Here are some examples of how PGO optimization is integrated in other projects:

Linguagem predominante
Rust
Estrelas
469
Forks
74
Merge médio
17h 16min
PRs com merge (30d)
10

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de mozilla/rust-code-analysis

Todas as issues de mozilla/rust-code-analysis

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.