Created
July 18, 2012 21:04
-
-
Save matzew/3138888 to your computer and use it in GitHub Desktop.
NSMutableArray
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSMutableArray* ma = [[NSMutableArray alloc] init]; | |
| // about 0.015 seconds | |
| for (int i = 0; i<10000; i++) { | |
| [ma addObject:[NSString stringWithFormat:@"%@ %d", @"ABC", i]]; | |
| } | |
| // really slow: takes more than 7 seconds..... | |
| for (int i = 0; i<10000; i++) { | |
| [ma removeObject:[NSString stringWithFormat:@"%@ %d", @"ABC", i]]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment