The goal is to compare two arrays as and check if they contain the same objects (as fast as possible - there are lots of objects in the arrays). The arrays cannot be checked
How about converting both arrays to sets and comparing them.
NSSet *set1 = [NSSet setWithArray:arr1]; NSSet *set2 = [NSSet setWithArray:arr2];
Compare the two using
if([set1 isEqualToSet:set2]) { }