On Mon, 23 Jan 2006 17:31:01 +0100
Ralf Corsepius <rc040203(a)freenet.de> wrote:
> -Os is undeniably good for 2), most likely to the point where it
beats
> performance.
That exactly is the question!
The subsequent one would be: Where is the origin?
This has already been answered in previous responses. Modern processors are
so much faster than memory and other subsystems that cache misses destroy
most benefits of loop unrolling and other -02 "speed" optimizations that
were more appropriate for older systems. Using -0s ends up generating
code which has the best chance of reducing cache misses and thus ends up
being faster as well as smaller.
Sean