Fedora Stakeholders Debate Idea Of "-O3" Optimized Packages
Following the announcement yesterday that Ubuntu 25.04 will default to the -O3 optimization level with GCC for its Debian package builds, Fedora stakeholders have begun debating the merits of switching to the -O3 optimization level or not instead of the existing -O2 optimization level default.
Fedora contributor Neal Gompa raised the idea on the Fedora development list today in a "request for comments" whether Fedora 42 should consider moving to -O3 by default in a similar move to Ubuntu 25.04.
Reaction though to this idea has been mixed with some concerned about the increase in binary size from using the -O3 optimizations, whether the -O3 optimizations will actually pay off for the vast majority of packages compared to -O2, and related complexities in using -O3. Some Red Hat engineers like Jakub Jelinek of their compiler team have called it a "very bad idea" due to the code size increase from -O3, speed gains not being guaranteed, etc.
The discussion has also brought up the possibility of using Profile Guided Optimizations (PGO) and Link Time Optimizations (LTO) or AutoFDO (Automatic Feedback-Directed Optimizations) for more packages, but there are complexities involved there as well especially with how Fedora's build system is handled compared to the likes of SUSE/openSUSE with more widespread compiler optimizations employed there.
No decisions have been made yet plus the fact of needing to go through the FESCo approval process. But at least the matter is being debated. It's looking like Fedora switching to -O3 likely won't have enough interest but hopefully this discussion can lead to work on employing other compiler optimization techniques for Fedora packages. Those wanting to follow the discussion can do so via this Fedora-devel thread.
Fedora contributor Neal Gompa raised the idea on the Fedora development list today in a "request for comments" whether Fedora 42 should consider moving to -O3 by default in a similar move to Ubuntu 25.04.
Reaction though to this idea has been mixed with some concerned about the increase in binary size from using the -O3 optimizations, whether the -O3 optimizations will actually pay off for the vast majority of packages compared to -O2, and related complexities in using -O3. Some Red Hat engineers like Jakub Jelinek of their compiler team have called it a "very bad idea" due to the code size increase from -O3, speed gains not being guaranteed, etc.
The discussion has also brought up the possibility of using Profile Guided Optimizations (PGO) and Link Time Optimizations (LTO) or AutoFDO (Automatic Feedback-Directed Optimizations) for more packages, but there are complexities involved there as well especially with how Fedora's build system is handled compared to the likes of SUSE/openSUSE with more widespread compiler optimizations employed there.
No decisions have been made yet plus the fact of needing to go through the FESCo approval process. But at least the matter is being debated. It's looking like Fedora switching to -O3 likely won't have enough interest but hopefully this discussion can lead to work on employing other compiler optimization techniques for Fedora packages. Those wanting to follow the discussion can do so via this Fedora-devel thread.
47 Comments