3 ms·
I really appreciated my CS education after reading the following from Apple's core data documentation: "There are many situations where you may need to find ex
by gcheong 16y ago
I really appreciated my CS education after reading the following from Apple's core data documentation:
"There are many situations where you may need to find existing objects (objects already saved in a store) for a set of discrete input values. A simple solution is to create a loop, then for each value in turn execute a fetch to determine whether there is a matching persisted object and so on. This pattern does not scale well. If you profile your application with this pattern, you typically find the fetch to be one of the more expensive operations in the loop (compared to just iterating over a collection of items). Even worse, this pattern turns an O(n) problem into an O(n^2) problem."
- masomenos 16y agoto play devil's advocate, what you'd need to know to parse that paragraph was covered by my CS 102 class. So you'd only need to have taken a couple classes, rather than majored in the subject.