• 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
NSMutableArray Adding, Sorting and Removing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMutableArray Adding, Sorting and Removing?


  • Subject: NSMutableArray Adding, Sorting and Removing?
  • From: Kevin Bracey <email@hidden>
  • Date: Mon, 08 Aug 2011 18:09:59 +1200

Hi All,

I don't want to fall prey to preemptive optimising but I was wondering?

I have a NSMutableArray and I'm sticking actions in it that are then sorted by NSDate compare:, things I need done at a certain day or time neatly in order. Up to about 1000 pending actions.

Currently, I check the Time of the object at index 0, if I need to do something I do it, and remove the object from the bottom. This is good.

My question is would it be more efficient to sort the array so the next action becomes the Last object of the array and remove it from the top instead of the bottom?

Or is this all so efficient it make no real difference.

cheers
Kevin_______________________________________________

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

  • Follow-Ups:
    • Re: NSMutableArray Adding, Sorting and Removing?
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: CFURLWriteDataAndPropertiesToResource as root?
  • Next by Date: Re: NSMutableArray Adding, Sorting and Removing?
  • Previous by thread: Re: CFURLWriteDataAndPropertiesToResource as root?
  • Next by thread: Re: NSMutableArray Adding, Sorting and Removing?
  • Index(es):
    • Date
    • Thread