Re: IOS floating point performance
Re: IOS floating point performance
- Subject: Re: IOS floating point performance
- From: Trygve Inda <email@hidden>
- Date: Wed, 07 Aug 2013 15:25:34 -0700
- Thread-topic: IOS floating point performance
>
> On Aug 7, 2013, at 14:34 , Trygve Inda <email@hidden> wrote:
>
>> I am currently doing it on an NSThread. I may try replacing all the doubles
>> with floats in the algorithm and see how that goes (on a backup of course!).
>
> Yes, floats should help (unless precision errors make it worse). You'll be
> moving a lot less memory around, and they're computed in hardware (I think
> double requires software intervention, but I could be wrong about that).
>
>> How do I set optimization on a per-file basis?
>
> In the Target settings, Build Phases tab, Compile Sources phase, you can set
> individual compiler flags. I put -O3 on each of the files I want optimized.
> -O2 or -Os should be tried, too, to see which gives you the best results.
>
I tried using floats and the results were wrong, presumably due to lower
precision and compounding of errors (but it took roughly the same amount of
time as doubles).
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden