views:

71

answers:

1

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 objectForKey: will introduce some performance gains?

A: 

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!

Larsaronen