Folks;

Under some circumstances I'm not sure how big a mutable object might need be.
So is there any guidance on coming up with a value for capacity?

Assume for these cases that reasonable guesses range from say 2 - 5000...

I assume it's wasteful to just do a land grab with +arrayWithCapacity: 5000 but I also assume that it's unnecessarily burdensome to do +arrayWithCapacity:2.

So is the 'best' +arrayWithCapacity:2500?

It feels a little like premature optimization, but I do have to provide a value in the code....
Thanks for any feedback!
Steve
_______________________________________________

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 arch...@mail-archive.com

Reply via email to