Consider a set of thousands of NSString objects, in memory.
What is the most efficient way to search for a particular NSString in the set? Would using NSDictionary suffice? Or is it guaranteed that NSSet‘s search is O(1) (couldn’t find any documentation that says so)?
And would the same strategy apply to NSData objects?
This page shows the following note about sets:
So for
NSStringyou could expect constant time based on the above.