Re: Xcode 5.1 compiler option -Ofast
Re: Xcode 5.1 compiler option -Ofast
- Subject: Re: Xcode 5.1 compiler option -Ofast
- From: Fritz Anderson <email@hidden>
- Date: Mon, 17 Mar 2014 14:06:13 -0500
On 14 Mar 2014, at 1:41 PM, Alex Zavatone <email@hidden> wrote:
> Just noticed the new compiler option in Xcode 5.1 called Fastest, Aggressive Optimization.
>
> I didn't see any info on this in the What's New in Xcode docs. Is there any handy reference for this new feature?
>
> Thanks.
Answering the actual question? I’ve heard of that.
You might learn something from groveling the clang source code; it’s open.
However, Apple defaults release builds to -Os (size) for a reason. “Fast” optimizations entail inlining functions that aren’t even declared inline, and unwinding loops into serial repetitions of the loop content. Tricks like that inflate the binary, and make overflows of the processor cache more likely and more frequent. Cache memory can keep up with the CPU; RAM can’t. Faulting the cache costs you more speed than “efficient” code.
Local (single-file) use of aggressive optimization might pay off for small inner loops, but -Os is where you should start.
— F
_______________________________________________
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