Well, to sort an array, you need to at least take a look at each element, which is undoubtedly O(n) . There are several mathematical works that show that there can be no better sorting algorithm, and then O(n*log(n)) , for example, Mergesort . Since the comparator implements Mergesort , I believe that complexity should be O(n*log(n)) for better, medium, and worse.
Here you can find information about Mergesort : Mergesort
And some article on the best time complexity of the sorting algorithm: Sorting Algorithms
I could not find the exact implementation of this method, but here is a great article on how you can dig deeper into the implementation of arrays in Objective-C and look at the implementation of methods: Providing NSMutableArray
source share