Is that thing using bubble sort? Or what exactly? How does it work in context with an NSFetchRequest of Core Data?
The NSSortDescriptor
API does not
specify the algorithm (or even, like
virtually all of the Cocoa APIs, a
Big-O complexity guarantee). You
should assume that the sort
algorithm used is an implementation
detail. You should probably also
assume, however, that the algorithm
used is selected at run time for
best performance. Unless you have
hard requirements for time or memory
complexity, you should use the
public API and let the framework
authors at Apple worry abou the
details.
If you have complexity requirements, you may find CHDataStructures framework helpful in writing your own collection/sorting implementation.
For NSFetchRequest
, you should again assume that it is choosing an appropriate sort algorithm. In particular, sorting will be done by the SQLite engine, if possible, when using a SQL persistent store with Core Data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With