• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IOS floating point performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IOS floating point performance


  • Subject: Re: IOS floating point performance
  • From: Conrad Shultz <email@hidden>
  • Date: Wed, 07 Aug 2013 14:32:40 -0700

On Aug 7, 2013, at 1:50 PM, Trygve Inda <email@hidden> wrote:

> I have an app that is running slow. I have narrowed it down to several
> functions which are trig-intensive (used to calculate the position of the
> moon at a given moment and more specifically to calculate rise/set times).
>
> To calculate the position and rise/set times for a month on average,
> requires:
>
> 300 trig functions for position
> 24 points in time to find the correct set of three points
> 30 days
>  2 events
>
> Total of 432,000 trig functions (mostly sin and cos)
>
> On my iPad 3, this takes about 3 seconds, and on my desktop (2.3GHz
> Quad-core i7) it is nearly instantaneous.
>
> I am using doubles (not floats).
>
> What can I do to speed this up?

This is somewhat outside my area of expertise, but if your calculations are at least partially independent, and can thus be expressed in terms of vector calculations, then you might take a look at vecLib (part of Accelerate.framework),

https://developer.apple.com/library/ios/#documentation/Performance/Conceptual/vecLib/Reference/reference.html

There’s also a WWDC session from 2011 or 2012 that provides an introduction to Accelerate.framework.

-Conrad
_______________________________________________

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


References: 
 >IOS floating point performance (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: IOS floating point performance
  • Next by Date: Re: IOS floating point performance
  • Previous by thread: Re: IOS floating point performance
  • Next by thread: Re: IOS floating point performance
  • Index(es):
    • Date
    • Thread