Rust article or tutorial idea…. optimizing with BOLT + LTO + PGO

Hello again,

Today I have read a news article that BOLT (Facebook/Meta project) has merged into LLVM code tree.
The BOLT + LTO + PGO combination gives a impressive performance uplift (34 % to 68.5 %) to many Clang (LLVM) and GCC compiled programs, see article. Including the Kernel, and even the Clang and GCC compilers execution.

  1. BOLT
  2. LTO – Link Time Optimization
  3. PGO – Profile Guided Optimization

Se the 2 following articles:

BOLT Merged Into LLVM To Optimize Binaries For Faster Performance

Facebook Has Been Working On BOLT'ing The Linux Kernel For Greater Performance

GitHub - BOLT

It would be a really nice contribution to the Rust community, if someone that has the experience off using those 3 tools, decided to make a nice tutorial or practical article on how to apply it in Rust the combination of BOLT + LTO + PGO, with a nice example and all the installation process.

Thank you.

Best regards,

1 Like

If this BOLT thing indeed landed in upstream LLVM, then it will be available whenever the Rust compiler team decides to a new enough version of LLVM that supports it. There's not much users can do with it until then.

From what I reed, BOLT already exists in the GitHub repository I link above and it can at this moment be used with a LLVM and GCC binary. I think that the merge of the code tree will give a tighter integration with LLVM, but it can already be used.

But because it’s a profiler guided optimization it has many steps like PGO and requires installation of extra software, so a nice tutorial or article focused on Rust, would allow a greater numbers of the members of the Rust community to use the process more.

Best regards,

Adding to existing doc would be wise when it eventually comes.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.