开发者

iPhone NSDictionary objectForKey: vs valueForKey: performance

In a code base I work with method valueForKey: is often used instead of objectForKey:. I have to optimize few methods that does this and was thinking if changing this to 开发者_JS百科objectForKey: will introduce some performance gains?


For NSDictionary i would use objectForKey:..

valueForKey: redirects to objectForKey if the key does not start with @ and calls [super valueForKey:] if it does..

using find & replace you can change to objectForKey pretty fast so why not, but i doubt you will notice any difference at all!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜