Thursday, September 6, 2012

Block-Based Dictionary Enumeration Can Be Pretty Slow

You’d expect that -[NSDictionary enumerateKeysAndObjectsUsingBlock:] would be faster than fast-enumerating the keys and then looking up the objects, as it could access both at the same time while walking the hash table. However, Mike Abdullah found that it’s actually much slower.

Comments RSS · Twitter

Leave a Comment