title: Improve search performance in objective-c
body: <p>I am searching through around 100k strings in a function: </p>
  
  <pre><code>results = [NSMutableArray new];
  for (int n = 0; n &lt; (int)_donkey.searchStrings.count; n++){
      if ([[_donkey.searchStrings[n] lowercaseString] rangeOfString:tf.text.lowercaseString].location != NSNotFound){
          [results addObject:_donkey.formattedStrings[n]];
      }
  }
  </code></pre>
  
  <p>where <code>tf.text</code> is the user inputted text in a <code>UITextField</code>. Performance is slow and I get the impression there is a better way of searching rather than a straight up string comparison anyway. </p>
  
  <p>The strings being searched through are formatted like this: "attributeA attributeB attributeC", so if attributeB is entered before attributeA, it does not come up as a result, which it should.</p>