Which has faster performance indexesOfObjectsPassingTest or filteredArrayUsingPredicate?
When needing to filter an NSArray to get a subset of the items in the array returned, which method is quicker more frequently and in edge cases? The following tests (compiled in Release mode, executed on a Mac Pro) indicate that filteredArrayUsingPredicate is slower than indexesOfObjectsPassingTest if you use a "textual" predicate, but faster if you use block-based predicate. The fasted method in my test was a simple (fast-enumeration) loop that adds all matching objects to a mutable array. Results for filtering an array of 10,000,000 dictionaries, where about 50% match the predicate: 8.514334