Which of these, if either, is more efficient?
NSMutableArray *array = [NSMutableArray arrayWithArray:@[@1, @2]];
or
NSMutableArray *array = [@[@1, @2] mutableCopy];
Or are these the same internally?
Which of these, if either, is more efficient?
NSMutableArray *array = [NSMutableArray arrayWithArray:@[@1, @2]];
or
NSMutableArray *array = [@[@1, @2] mutableCopy];
Or are these the same internally?
The two options you provide both first create an NSArray and then create an NSMutableArray from the NSArray so there is essentially no difference.
There is a third option that would be ever so slightly better in this case:
NSMutableArray *array = [NSMutableArray arrayWithObjects:@1, @2, nil];
This doesn't create an intermediate NSArray like your other two options.