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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to