Re: NSArray vs. NSSet
Re: NSArray vs. NSSet
- Subject: Re: NSArray vs. NSSet
- From: Shawn Erickson <email@hidden>
- Date: Thu, 10 Mar 2005 11:45:35 -0800
On Mar 10, 2005, at 11:29 AM, Mike R. Manzano wrote:
Anyone know if NSSets are faster than NSArrays?
Faster "than" when doing what?
Why wouldn't I always just use an NSArray?
This a trick question? ;-) The answer is when NSSet is a better fit for
what you are doing then NSArray.
Review the docs for both classes and think about the difference on what
they do, for example one allows you to access items primarily by index
the other by object comparison, one is ordered the other isn't, one
allows duplicate objects in the collection the other doesn't, etc.
You may want to review the following...
<http://developer.apple.com/documentation/Cocoa/Conceptual/Collections/
index.html>
Anyway we can't help much other then guess at what type of comparison
you want between these two collection classes... we need to know more
about what you want to use them for.
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden