Ridiculous Fish: Our Arrays Aren't
Looks like I didn't get the RSS feed of Ridiculous Fish for a while... now that HexFiend is up, I'm suddenly getting all kinds of nice postings from the past. A really nice one is Array where he dissects how CFArray (and thus, by extension, NSArray) performs against other collection classes in other frameworks.
When one looked at the design and the capacity suggestions, and at the different actual classes the debugger showed you when you sent a dictionary message to an array or so, it already became obvious that you'd get different implementations for different array sizes, but here's a nice test with sort-of-hard numbers to illustrate this, and you get it explained by a pro, in a humorous way. Definitely a must-read.
|