>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)srce.hr> writes:
> We should make -O3 the default optimization flag for gcc. In
fact,
> I submitted a patch that did this, but Steve REJECTED it.
Hrvoje> I agree with Steve. -O3 generates much more code.
I disagree. I continue to lobby for gcc -O3.
ObBench:
I measured the extent of the bloat (size of temacs is reported)
Linux, egcs 1.0.2, CFLAGS=-O2: 2314155
Linux, egcs 1.0.2, CFLAGS=-O3: 2441153
Solaris, egcs 1.0.2, CFLAGS=-O2: 2843084
Solaris, egcs 1.0.2, CFLAGS=-O3: 2963692
As expected, the RISC binaries are larger.
Yes, -O3 does produce larger binaries, due to the auto-inlining. But
the difference is not very large (about 5%). I think gcc's inlining
heuristics are pretty reasonable.
Surprisingly, Sun cc generates much larger binaries when inlining:
Solaris, Sun cc, CFLAGS=-xO3: 3167060
Solaris, Sun cc, CFLAGS=-xO4: 3977796
Martin