I am new to iOS. Does anyone know if NSSetfaster than NSArray? Why don't I just use it NSArray?
NSSet
NSArray
Can someone explain the difference between NSSetand NSArray?
NSSet is used to create unique objects.
NSArray may have duplicate objects.
NSSet is an unordered collection.
NSArray is an ordered collection.
NSArray is faster than NSSet for easy hold and iteration. Less than 50% faster to build and 500% faster to iterate. if you only need to rename the contents, do not use NSSet.
, .
, - (, ), , .
:
http://www.cocoawithlove.com/2008/08/nsarray-or-nsset-nsdictionary-or.html
, , . , , , .