• 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: fast search of NSPointerArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fast search of NSPointerArray


  • Subject: Re: fast search of NSPointerArray
  • From: Keary Suska <email@hidden>
  • Date: Sun, 23 Jun 2013 08:12:48 -0600

On Jun 22, 2013, at 9:25 PM, James Maxwell wrote:

> t's a mixed graph structure. Basically, I'm storing all unique nodes in an NSMutableArray, then using NSPointerArrays to build the adjacency lists. It works really nicely for learning/building the graph, but it does seem as though searches are a little slower. My guess is that this is because I'm now iterating over a lot of null values (which I wasn't before). But, as Graham says, I should really verify this before going any further with altering the data structures...

You might also want to consider as you are profiling that the issue may simply be the need to iterate and that a non-linear approach would work better. After you have determined where the performance issue is, posting a graph of your data structure and what it represents, including how it needs to be modified throughout its lifetime would allow listers to make recommendations on structure.

Notwithstanding the performance issue, it may be useful to periodically compact the pointer arrays. Some heuristics could be employed to minimize its impact on the user experience; e.g. at save time.

HTH,

Keary Suska
Esoteritech, Inc.



_______________________________________________

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: 
 >fast search of NSPointerArray (From: James Maxwell <email@hidden>)
 >Re: fast search of NSPointerArray (From: Ken Thomases <email@hidden>)
 >Re: fast search of NSPointerArray (From: James Maxwell <email@hidden>)

  • Prev by Date: Re: Core Data Reverse Engineering KickStarter Project
  • Next by Date: Re: Why is it wrong to have relationships without an inverse
  • Previous by thread: Re: fast search of NSPointerArray
  • Next by thread: Re: Why is it wrong to have relationships without an inverse
  • Index(es):
    • Date
    • Thread