Perhaps the most often repeated complaint about Rust is its slow feedback loop and long compilation times. I hear about it all the time; in Rust podcasts, blog posts, surveys, conference talks or offline discussions. I also regularly complain about it, being a Rust user myself!| Kobzol’s blog
TL;DR: On Linux, if you have Transparent Huge Pages enabled, you can try to run cargo with the environment variable MALLOC_CONF="thp:always,metadata_thp:always" for a potential ~5% speed boost.| Kobzol’s blog
TL;DR: This post describes LLVM optimization remarks that can useful to help the compiler better optimize your programs. If you want to analyze remarks generated from compiling Rust programs, you can use the cargo-remark tool.| Kobzol’s blog
During the first half of 2023, I have continued my quest for optimizing the build, test and performance monitoring infrastructure of the Rust compiler. This post describes what has been done in this area, and serves a follow-up to my previous post on this topic. Note that possibly the biggest sub-project that I have worked on was the implementation of runtime benchmarks for the Rust benchmark suite, however I will dedicate a separate blog post for that (which I will hopefully publish in the n...| Kobzol’s blog
Last year I was working on improving the Profile-guided optimization (PGO) workflow used to build the Rust compiler. While doing that, I realized that while PGO works fine for Rust, it is not as straightforward to use and as discoverable as I would have liked. That led me to the creation of cargo-pgo, a Cargo subcommand that makes it easier to optimize Rust binaries with PGO (and BOLT, see below).| Kobzol’s blog