• 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: Mutable arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mutable arrays


  • Subject: Re: Mutable arrays
  • From: Graham Cox <email@hidden>
  • Date: Mon, 20 Oct 2008 16:11:08 +1100


On 20 Oct 2008, at 4:06 pm, DKJ wrote:

Since mutable arrays and dictionaries expand as required when new objects are added, when should one use -initWithCapacity: methods?


I'd guess they're only worth using if you know you are about to populate one with a lot of items and the performance hit of letting them grow "naturally" is worth avoiding. There may also be private classes within the cluster that are optimised for certain numbers of objects, so this will act as a hint as to which one should be used.

--Graham
_______________________________________________

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: Mutable arrays
      • From: j o a r <email@hidden>
References: 
 >Mutable arrays (From: DKJ <email@hidden>)

  • Prev by Date: Mutable arrays
  • Next by Date: Detecting system preference for trackpad zooming.
  • Previous by thread: Mutable arrays
  • Next by thread: Re: Mutable arrays
  • Index(es):
    • Date
    • Thread