nanogui: How to get the smallest code size with mipsel-linux-gcc


Previous by date: 22 Feb 2001 20:03:34 -0000 Re: about nanowm, Alex Holden
Next by date: 22 Feb 2001 20:03:34 -0000 Re: vnc for nano-X question, George Harvey
Previous in thread: 22 Feb 2001 20:03:34 -0000 How to get the smallest code size with mipsel-linux-gcc, Robert Hartley
Next in thread:

Subject: Re: How to get the smallest code size with mipsel-linux-gcc
From: Alex Holden ####@####.####
Date: 22 Feb 2001 20:03:34 -0000
Message-Id: <Pine.LNX.4.04.10102222001480.627-100000@hyperspace.linuxhacker.org>

On Thu, 22 Feb 2001, Robert Hartley wrote:
> mipsel-linux-gcc -c -ansi -pedantic -O6 -fno-strength-reduce somefile.c
> Is there some other option I can use to shrink it more?

-O3 (and greater) enables automatic loop unrolling, which can increase the
code size quite a bit. Try -O2 or -Os instead. I've found experimentally
that on x86 -O2 is probably the best compromise of speed and code size,
whilst -Os is slightly smaller and quite a bit slower. I would guess
the Mips GCC probably behaves similarly.

-- 
------- Alex Holden -------
http://www.linuxhacker.org/
 http://www.robogeeks.org/


Previous by date: 22 Feb 2001 20:03:34 -0000 Re: about nanowm, Alex Holden
Next by date: 22 Feb 2001 20:03:34 -0000 Re: vnc for nano-X question, George Harvey
Previous in thread: 22 Feb 2001 20:03:34 -0000 How to get the smallest code size with mipsel-linux-gcc, Robert Hartley
Next in thread:


Powered by ezmlm-browse 0.20.