On Tuesday 12 June 2001 9:29am, Edward Muller wrote:
> Sorry for the cross list posting....But I think this is important enough...
>
> I want to ask people compiling programs for the iPAQ to compile them with
> the -Os optimization instead of the -O2 optimization. According to the gcc
> man pages/information that I've read -Os is like -O2, but with additional
> optimizations for size (not RAM, but file).
>
> In the programs I've compiled for the iPAQ I've seen anywhere from 10% to
> 20% size reductions (usually around 10%, but 10% across 16 MB is 1.6 MB ...
> :-)
I expect it vastly depends on the code you're compiling. As another
datapoint, the 30 QPe applications total 992K (2500K uncompressed) of Flash
usage when compiled with -O2, and 980K (2484K uncompressed) when compiled
with -Os, which is a saving of a mere 12K, 1.2%, of flash - comparable to
Erik Mouw's results with the kernel. This is with gcc 2.95.2.
The Word Game (the only really CPU-intensive QPe application) is noticeably
slower with -Os than -O2.
Note that GCC doesn't unroll loops with -O2.
-- Warwick ps. QPe is http://qpe.sourceforge.net if you're wondering.Received on Tue Jun 12 2001 - 21:42:23 EDT
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:12:27 EDT