Fedora Stakeholders Debate Idea Of "-O3" Optimized Packages

Written by Michael Larabel in Fedora on 31 October 2024 at 09:00 AM EDT. 42 Comments
FEDORA
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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week