• 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: Efficiently adding a bunch of items to an NSMutableArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Efficiently adding a bunch of items to an NSMutableArray


  • Subject: Re: Efficiently adding a bunch of items to an NSMutableArray
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 22 Sep 2010 15:59:16 +0200

On Sep 22, 2010, at 2:46 PM, Oleg Krupnov wrote:
> I think that if I add them one-by-one in a loop, the array will have
> to reallocate its internal memory frequently. This seems inefficient.

 "I think" and "seems" are bad advice. What do Shark/Instruments say? Does it take long? Does this code run so frequently that it's even worth spending time on optimizing it?

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."

_______________________________________________

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: 
 >Efficiently adding a bunch of items to an NSMutableArray (From: Oleg Krupnov <email@hidden>)

  • Prev by Date: Re: What's the point of @properties?
  • Next by Date: Re: NSRunLoop behavior
  • Previous by thread: Re: Efficiently adding a bunch of items to an NSMutableArray
  • Next by thread: Re: Efficiently adding a bunch of items to an NSMutableArray
  • Index(es):
    • Date
    • Thread