Re: RFC: Moving to -O3 for Fedora Linux

2024-11-03 Thread Leslie Satenstein via devel
I found Os to offer the best all around gcc  and with C files. I tested a large number of string type content files (not float or other numeric calculations) source fileswith gcc and with clang.   gcc provides a smaller executable than does clang,  and Os does much better than O3 I used CFLAGS :=

Re: RFC: Moving to -O3 for Fedora Linux

2024-11-02 Thread Kevin Kofler via devel
Neal Gompa wrote: > I know the idea of moving to -O3 has been briefly mentioned before in > other contexts when we've discussed uplifting the flags, but it looks > like Ubuntu is moving to -O3 for Ubuntu 25.04[1]. Is there a reason > why we shouldn't consider doing the same for Fedora Linux 42? Ye

Re: RFC: Moving to -O3 for Fedora Linux

2024-11-01 Thread Josh Stone
On 10/30/24 7:46 PM, Neal Gompa wrote: > Hey folks, > > I know the idea of moving to -O3 has been briefly mentioned before in > other contexts when we've discussed uplifting the flags, but it looks > like Ubuntu is moving to -O3 for Ubuntu 25.04[1]. Is there a reason > why we shouldn't consider do

Re: RFC: Moving to -O3 for Fedora Linux

2024-11-01 Thread John Reiser
If -O3 makes debugging harder, then I'm against its default use. If there are no public, documented measurements that -O3 is better for a specific package, then don't use -O3 for that package. I work with tool chains for software development, and with low-level libraries such as glibc, musl, uCli

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Kilian Hanich via devel
Am 31.10.24 um 19:18 schrieb Jakub Jelinek: On Thu, Oct 31, 2024 at 07:14:08PM +0100, Kilian Hanich via devel wrote: While we are at it, please don't mix -O2 and -O3 while compiling the same program. This can break things and is really not fun to debug (and that's also the reason why a lot of b

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Jakub Jelinek
On Thu, Oct 31, 2024 at 07:14:08PM +0100, Kilian Hanich via devel wrote: > While we are at it, please don't mix -O2 and -O3 while compiling the > same program. > > This can break things and is really not fun to debug (and that's also > the reason why a lot of buildsystems don't support that). It

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Kilian Hanich via devel
Am 31.10.24 um 19:02 schrieb Jakub Jelinek: On Thu, Oct 31, 2024 at 07:47:22PM +0200, drago01 wrote: Isn't instruction cache footprint already part of "performance" i.e if performance is improved it shouldn't matter and vice versa, or what am I missing? That is not how compilers work, ... T

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Jakub Jelinek
On Thu, Oct 31, 2024 at 07:47:22PM +0200, drago01 wrote: > > > Isn't instruction cache footprint already part of "performance" i.e if > > > performance is improved it shouldn't matter and vice versa, or what am I > > > missing? > > > > That is not how compilers work, ... > > > > That's not what I

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread drago01
On Thursday, October 31, 2024, Jakub Jelinek wrote: > On Thu, Oct 31, 2024 at 10:15:03AM +0200, drago01 wrote: > > On Thursday, October 31, 2024, Jakub Jelinek wrote: > > > > > On Wed, Oct 30, 2024 at 10:46:01PM -0400, Neal Gompa wrote: > > > > I know the idea of moving to -O3 has been briefly m

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Peter Robinson
On Thu, 31 Oct 2024 at 11:11, Jakub Jelinek wrote: > > On Thu, Oct 31, 2024 at 10:57:02AM +, Peter Robinson wrote: > > On Thu, 31 Oct 2024 at 07:32, Jakub Jelinek wrote: > > > > > > On Wed, Oct 30, 2024 at 10:46:01PM -0400, Neal Gompa wrote: > > > > I know the idea of moving to -O3 has been b

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Richard W.M. Jones
On Thu, Oct 31, 2024 at 12:36:28PM +0100, Jakub Jelinek wrote: > On Thu, Oct 31, 2024 at 11:26:23AM +, Peter Robinson wrote: > > I seem to remember firefox uses LTO+PGO for speed ups/ > > > > I wonder if we could provide some rpm macros and packaging guidelines > > to assist packagers in this

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Jakub Jelinek
On Thu, Oct 31, 2024 at 12:12:30PM +, Richard W.M. Jones wrote: > On Thu, Oct 31, 2024 at 12:36:28PM +0100, Jakub Jelinek wrote: > > On Thu, Oct 31, 2024 at 11:26:23AM +, Peter Robinson wrote: > > > I seem to remember firefox uses LTO+PGO for speed ups/ > > > > > > I wonder if we could pro

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Jakub Jelinek
On Thu, Oct 31, 2024 at 07:28:35AM -0400, Neal Gompa wrote: > SUSE has the benefit of their build system taking care of automatic > rebuilds and simple build loops for them. This allows them to have a > much more hands-off approach than we do, and gives their packagers > significantly more breathin

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Jakub Jelinek
On Thu, Oct 31, 2024 at 11:26:23AM +, Peter Robinson wrote: > I seem to remember firefox uses LTO+PGO for speed ups/ > > I wonder if we could provide some rpm macros and packaging guidelines > to assist packagers in this process to make things more straight > forward and less error prone? Is s

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Neal Gompa
On Thu, Oct 31, 2024 at 7:20 AM Jakub Jelinek wrote: > > On Thu, Oct 31, 2024 at 10:57:02AM +, Peter Robinson wrote: > > On Thu, 31 Oct 2024 at 07:32, Jakub Jelinek wrote: > > > > > > On Wed, Oct 30, 2024 at 10:46:01PM -0400, Neal Gompa wrote: > > > > I know the idea of moving to -O3 has been

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Jakub Jelinek
On Thu, Oct 31, 2024 at 10:57:02AM +, Peter Robinson wrote: > On Thu, 31 Oct 2024 at 07:32, Jakub Jelinek wrote: > > > > On Wed, Oct 30, 2024 at 10:46:01PM -0400, Neal Gompa wrote: > > > I know the idea of moving to -O3 has been briefly mentioned before in > > > other contexts when we've discu

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Peter Robinson
On Thu, 31 Oct 2024 at 07:32, Jakub Jelinek wrote: > > On Wed, Oct 30, 2024 at 10:46:01PM -0400, Neal Gompa wrote: > > I know the idea of moving to -O3 has been briefly mentioned before in > > other contexts when we've discussed uplifting the flags, but it looks > > like Ubuntu is moving to -O3 fo

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Jakub Jelinek
On Thu, Oct 31, 2024 at 10:15:03AM +0200, drago01 wrote: > On Thursday, October 31, 2024, Jakub Jelinek wrote: > > > On Wed, Oct 30, 2024 at 10:46:01PM -0400, Neal Gompa wrote: > > > I know the idea of moving to -O3 has been briefly mentioned before in > > > other contexts when we've discussed up

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread drago01
On Thursday, October 31, 2024, Jakub Jelinek wrote: > On Wed, Oct 30, 2024 at 10:46:01PM -0400, Neal Gompa wrote: > > I know the idea of moving to -O3 has been briefly mentioned before in > > other contexts when we've discussed uplifting the flags, but it looks > > like Ubuntu is moving to -O3 fo

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-31 Thread Jakub Jelinek
On Wed, Oct 30, 2024 at 10:46:01PM -0400, Neal Gompa wrote: > I know the idea of moving to -O3 has been briefly mentioned before in > other contexts when we've discussed uplifting the flags, but it looks > like Ubuntu is moving to -O3 for Ubuntu 25.04[1]. Is there a reason > why we shouldn't consid

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-30 Thread Carlos Rodriguez-Fernandez
I found some interesting ones [1][2]. The common denominator is that between -O2 and -O3, the runtime improvement is increased a little bit overall but in some cases it can be significant, while the power consumption also increases. The memory access also tends to decrease. None of those study

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-30 Thread Carlos Rodriguez-Fernandez
It would be great to see some empirical analysis about binary size increase, its impact on RAM consumption, and actual speed benefit, especially on Fedora. I'm having a hard time finding anything about it. Regards, Carlos R.F. On 10/30/24 7:46 PM, Neal Gompa wrote: Hey folks, I know the idea

Re: RFC: Moving to -O3 for Fedora Linux

2024-10-30 Thread Alexey Lunev
On Thu, 31 Oct 2024 г. 05:46:01 GMT+3, Neal Gompa wrote: > Is there a reason why we shouldn't consider doing the same for Fedora Linux 42? -O3 is known to break code which rely on undefined behavior and have bigger binaries than -O2. Also -O3 not always improves performance. If -O3 will be defa

RFC: Moving to -O3 for Fedora Linux

2024-10-30 Thread Neal Gompa
Hey folks, I know the idea of moving to -O3 has been briefly mentioned before in other contexts when we've discussed uplifting the flags, but it looks like Ubuntu is moving to -O3 for Ubuntu 25.04[1]. Is there a reason why we shouldn't consider doing the same for Fedora Linux 42? [1]: https://lis