Skip to content

Evaluate using Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO) #41

Open
@zamazan4ik

Description

Hi!

Recently I checked Profile-Guided Optimization (PGO) and Post-Link Optimization (PLO) improvements on multiple projects. The results are available here. According to the tests, these optimizations can help with achieving better performance in many compilers and compiler-like things: Clang, GCC, Rustc, CPython, etc. Since this, I think trying to optimize the Onyx ecosystem with PGO and PLO can be a good idea.

I can suggest the following action points:

  • Perform PGO benchmarks on Onyx (compiler, interpreter, maybe something else). If it shows improvements - add a note to the documentation about possible improvements in 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 Onyx tooling according to their workloads.
  • Optimize pre-built Onyx 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.

Examples of how PGO optimization is integrated into other projects:

I have some examples of how PGO information looks in the documentation:

Regarding LLVM BOLT integration, I have the following examples:

I hope these ideas could be interesting for someone from the Onyx community. Even if right now possibly investing resources into this would be too early for Onyx - it could be a good idea for future improvements.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions