Re: Mutable arrays
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