NSMutableArray Adding, Sorting and Removing?
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