Skip to content

Evaluate using Profile-Guided Optimization (PGO) and Post Link Optimization (PLO) for the Inko tooling ecosystem #651

Closed
@zamazan4ik

Description

@zamazan4ik

Description

Recently I did many Profile-Guided Optimization (PGO) benchmarks on multiple projects (including static analysis tools and compilers like Rustc, Clang, Clangd, Clang Tidy, and many others) - the results are available here. I think it's worth trying to apply PGO to the Inko tooling ecosystem like the compiler (and maybe something else like code formatters, LSP server, etc.).

I can suggest the following things to do:

  • Evaluate PGO's applicability to Inko tooling.
  • If PGO helps to achieve better performance - add a note to Inko's documentation about that. In this case, users and maintainers will be aware of another optimization opportunity for Inko tools.
  • Provide PGO integration into the build scripts. It can help users and maintainers easily apply PGO for their workloads.
  • Optimize prebuilt binaries with PGO.

Here are some examples of how PGO is already integrated into other projects' build scripts:

Some PGO documentation examples in various projects:

After PGO, I can suggest evaluating LLVM BOLT as an additional optimization step after PGO - Post Link Optimization (PLO). But I suggest starting with PGO - it's a more stable optimization than PLO in the general case.

For the Rust projects, I recommend starting with cargo-pgo.

Related work

The issue is not the same as #650 . In #650 I propose to add a possibility to compile Inko programs with PGO. In this issue, I suggest compiling Inko tools like the compiler with PGO and PLO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilerChanges related to the compilerfeatureNew things to add to Inko, such as a new standard library moduleperformanceChanges related to improving performanceruntimeChanges related to the Rust-based runtime library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions