This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Improving GCC8 default option settings
> On 13 Sep 2017, at 1:15 PM, Michael Clark <michaeljclark@mac.com> wrote:
>
> - https://rv8.io/bench#optimisation
> - https://rv8.io/bench#executable-file-sizes
>
> -O2 is 98% perf of -O3 on x86-64
> -Os is 81% perf of -O3 on x86-64
>
> -O2 saves 5% space on -O3 on x86-64
> -Os saves 8% space on -Os on x86-64
>
> 17% drop in performance for 3% saving in space is not a good trade for a “general” size optimisation. It’s more like executable compression.
Sorry fixed typo:
-O2 is 98% perf of -O3 on x86-64
-Os is 81% perf of -O3 on x86-64
-O2 saves 5% space on -O3 on x86-64
-Os saves 8% space on -O3 on x86-64
The extra ~3% space saving for ~17% drop in performance doesn’t seem like a good general option for size based on the cost in performance.
Again. I really like GCC’s -O2 and hope that its binaries don’t grow in size nor slow down.