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!
精彩评论