Re: -O3 vs. -Os
Re: -O3 vs. -Os
- Subject: Re: -O3 vs. -Os
- From: Scott Fraser <email@hidden>
- Date: Tue, 17 Jan 2006 10:12:59 -0800
On Jan 17, 2006, at 04:56 AM, Steve Checkoway wrote:
Second, on what do you base that assertion? The idea that smaller
code is faster makes perfect sense when you think about it from a
cache point of view. Turning off optimizations and making the code
larger at the same time doesn't seem likely to improve performance.
In general, if you're app doesn't spend much time in any given
function, smaller code is better. "Regular" apps, particularly
object-oriented apps written C++, Java, and Objective-C, will have lots
of little functions, and no single function takes much time.
Optimizing those for speed doesn't help much. But if you have larger
functions with lots of loops (or large loops) where lots of time it
spent, it might make sense for the compiler to unroll those loops.
With object-oriented languages, you get much more bang for your buck by
changing your algorithms to make fewer function calls than by tweaking
the compiler settings.
Scott
-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden