Feature #19256
closedAdd PGO support
Description
[Abstract]
Add PGO support to Ruby interpreter.
[Proposal]
Profile-Guided Optimization (PGO) uses profiles from the existing workloads to make more aggressive optimization during compile time. There are multiple cases in real-life, when PGO improves performance significantly (like ScyllaDB, rustc, etc). From the interpreters world I know Python and V8 (both use PGO).
The proposal could be implemented in multiple ways. You could "simply" add PGO support to the existing build scripts, and the end users will be able to optimize with PGO the Ruby interpreter on their own for their specific workloads.
Another option is to optimize Ruby interpreter builds directly on your CI with some "sample" workload.
[Use cases]
Improve Ruby interpreter performance in general.
[Discussion]
There are no existing alternatives to PGO in Ruby.
[See also]
- Python implementation: https://docs.python.org/3/using/configure.html#cmdoption-enable-optimizations
- Possibly, LLVM BOLT also could be used additionally to PGO.