【发布时间】:2011-09-13 20:27:26
【问题描述】:
从集合中获取对象的速度更快?
一个。使用 [dictionary objectForKey:key]; 在 NSDictionary 中搜索
或
b.使用 [NSPredicate predicateWithFormat:@"someKey like %@",someKeyValue]; 在 NSArray 中搜索
在这两种情况下,我都会创建集合。
问候!
【问题讨论】:
标签: performance nsarray nsdictionary nspredicate