Re: MacIntel apps behaves weirdly when compiled with -02 not -01 - Almost solved(auto-vectorization issue)
Re: MacIntel apps behaves weirdly when compiled with -02 not -01 - Almost solved(auto-vectorization issue)
- Subject: Re: MacIntel apps behaves weirdly when compiled with -02 not -01 - Almost solved(auto-vectorization issue)
- From: Eric Albert <email@hidden>
- Date: Fri, 13 Jan 2006 12:55:39 -0800
On Jan 13, 2006, at 12:01 PM, Mark Wagner wrote:
On 1/13/06, Olivier Tristan <email@hidden> wrote:
Os do not remove some optims as written in the doc ?
I don't reallly care if the binary is 10% bigger. Only CPU usage is
important in audio apps :)
This was true back in the days of small CPU caches and fast memory
access. Now, with large CPU caches and CPUs that run much faster than
main memory, if you can make the application small enough that the
processing loop fits entirely within the L2 cache (or better, the L1
cache), then the application will run faster than a more heavily
optimized one that needs to access main memory for program code.
Exactly. We've found over and over that -Os produces better overall
system performance than -O2 or -O3 because it generates smaller code,
and smaller code typically results in better performance than faster
but larger code. That's why -Os is the default in Xcode.
Some specific CPU-intensive algorithms can benefit from -O2 or -O3,
of course. But as always, the best way to figure out things like
that is to find the parts of your code that aren't performing as well
as you'd like, measure them with Shark, and then figure out how to
improve their performance. Sometimes compiler flags will be the
solution there, but often algorithmic changes will improve things
even more.
-Eric
_______________________________________________
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