NSMutableArray initWithCapacity nuances
Matt Gallagher has written a pretty informative article on Cocoa’s collection classes, along with a couple of benchmarks (with & without initWithCapacity:, as well as cross class comparisons) http://cocoawithlove.com/2008/08/nsarray-or-nsset-nsdictionary-or.html His test (source available) for an NSMutableArray of length 1,000,000 took 0.582256sec without capacity and just 0.572139sec with capacity. Test | Time [NSMutableArray array] | 0.582256 … Read more