Faster way for NSMutableDictionary check

Viewed 67

I'm doing some app optimizations and in big loops the checks on NSMutableDictionary's are fairly taxing:

if ([self.variantBufferSequence objectForKey:[variant valueForKey:@"model_no"]] == nil) {
    [self.variantBufferSequence setObject:[NSMutableDictionary new] forKey:[variant valueForKey:@"model_no"]];
}

Is there a lighter way to check the existence of the entry (objectForKey) in the if-statement?

1 Answers
Related