4 ms·
I think they are great for building intuition. What don't you like about them?
by mungoman2 10y ago
I think they are great for building intuition. What don't you like about them?
- qq66 10y agoI also dislike most real-world computing analogies because it encourages the use of mental heuristics that are usually just not that relevant to the situation at hand. I remember when there was a big scandal about MBA applicants getting their admissions status by feeding in query strings to the URL, there was a big debate about whether it was like "breaking a lock" or "opening an unlocked door" which doesn't really respect the unique moral reasoning that you need to use to understand the actual situation at hand.
- Sylos 10y agoI generally like real-world analogies, but in this case I do find it too elaborate and unnecessary, too. As a straight answer to the question, it would have sufficed to explain that accessing a larger cache takes more time and resources than accessing a small cache. Then one could have compared that to desk vs. cabinet once to make it visual, but there's no need to extend that analogy for each individual cache level. That just exhausts the reader and makes it near-impossible to tell which parts of the analogy are relevant/accurate and which parts are just fluff to make the analogy work. Alternatively, if you really want to explain each individual detail of caches, then do go with such an elaborate analogy, but then explain at every step to what it corresponds and which part of the analogy is relevant. You shouldn't write out a page-worth of mostly accurate text and then write a paragraph afterwards to explain how the analogy fits. Chances are you've lost half of your readership at that point and many (myself included to be honest) will quit reading at exactly that point, because they feel like you're repeating yourself.
- smallnamespace 10y ago> it would have sufficed to explain that accessing a larger cache takes more time and resources than accessing a small cache. I think the point of the long analogy is to hammer in the intuition that physical locality has a concrete price in the real world, and the cache hierarchy is simply a consequence.
- peyton 10y agoSometimes long analogies like that of the article have trouble making obvious distinctions between design choices and The Way Things Work. For instance, this article's analogy makes assumptions about cache eviction policy and cache coherence that map nicely to an office setting. Other design choices might not map well. So intuition developed here might not be flexible enough to reason about caches in the real world. Not to say the analogy detracts from the article. The author includes a list of caveats. I really enjoyed the piece.