On Jan 7, 2010, at 12:29 PM, David Duncan wrote:
Given that you would likely want to do this test with a binary search I don't see any reason why it should be slow (effectively you can do the entire search with about 17*k compares).
To help make this thread more Cocoa-y, I would like to ask: Do the NSSet and NSArray methods like -containsObject perform in a fashion comparable to a home-rolled binary search? I greatly prefer to use the Cocoa stuff rather than try to remember/learn how to properly code such things.
Plus, the theory of premature-optimazation-is-bad would say just use the Cocoa stuff and only if performance is proven to be a problem, then look at optimizing, wouldn't it?
_______________________________________________ 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