[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ccc vs. gcc today



On Tue, Dec 02, 2003 at 08:20:53AM -0600, John Goerzen wrote:
> 
> I'm using apt-build right now to build some key libraries with
> -mcpu=ev56 -O3 and hope that'll do the trick, but at the same time, I'm
> wondering if ccc would do better -- and how easy it is to use it in
> place of gcc.

I suggest avoiding -O3.  Its optimizations can often hurt performance.
Even -O2 is often overkill.  In some simple tests on my 667mhz ev56
gcc-3.3 with '-mcpu=ev56 -Os' produced faster code than any of -O[123]
when building libjpeg and resulted in 20-30% smaller binaries.  (with such
a small cache, code footprint really matters)

Save the -O3 or -O2 for profiled hotspots in the code where you can prove
that they're better.  Overall they just add bloat which increases load
time, disk, ram and memory cache thrashing.

-g



Reply to: