Is there a reason for NSDictionary to return its keys as NSArray instead of NSSet? The documentation already states that the order of the
NSDictionary
NSArray
NSSet
My guess is that, since -allKeys returns a copy of the keys (it's not backed by the dictionary) that creating an NSSet is a lot of overhead (building a tree or hash table or whatever) when compared to just dumping the keys into a flat array.
-allKeys