Re: CONFIG_TINY

Bill Davidsen
2002-11-05T19:21:10Z

On Mon, 4 Nov 2002, Tom Rini wrote:

> On Mon, Nov 04, 2002 at 02:13:48AM +0000, Rob Landley wrote:

> > I've used -Os. I've compiled dozens and dozens of packages with -Os. It has
> > always saved at least a few bytes, I have yet to see it make something
> > larger. And in the benchmarks I've done, the smaller code actually runs
> > slightly faster. More of it fits in cache, you know.
>
> Then we don't we always use -Os?

1 - I'm not sure all versions of gcc support it, as in "it generates
correct code."

2 - I'm not sure how (if) it works on non-Intel systems.

3 - The performance gain is related to cache size and performance. The
obvious case is unrolling loops, you win if they fit in cache. If you have
a Celeron, P-III with 256k, P-4 with HT on, all have different cache
behaviour. And SMP or memory speed changes the penalty for a cache miss to
main memory.

4 - inertia, minimal gain and experience. Maybe no one sees enough gain to
justify the chance that some version of gcc is really broken.

5 - placebo effect. People just think it's faster because it's different.

6 - quantum effects, like Schroedinger's (sp?) cat it's only faster or
slower if you measure it.

Pick one or more of these as pleases you. My mind say 4, my heart says
5+6.

--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.