Hacker News new | ask | show | jobs
by mbca 3907 days ago
> I’m fascinated how simple the __NSDictionaryI turned out to be.

There may be other cases where one gets something entirely different than the __NSDictionaryI class, depending on how the dictionary was created or how much / what kind of data it contains. There is some evidence[1] that Apple switches implementations of its collection classes based on various conditions, even something very simple, such as when an array contains more than X elements (where "X" is some threshold where the optimization characteristics change). Being able to dynamically change implementations is the main benefit of class clusters after all.

[1] http://ridiculousfish.com/blog/posts/array.html