AFAIK PGO for Julia user code is a relevant topic. Were Julia to gain profile-guided recompilation as an option for Julia packages, as mentioned here, BenchmarkTools
could presumably stay simple, because LLVM would take care of the complexity. That is, BenchmarkTools
would just need to recompile with PGO, which should (when enough PGO-based optimizations are implemented) ensure that some of the issues mentioned here don’t matter.