4 ms·
Suppose you want to make a salad. register: a tomato in your hand level 1 cache: a tomato on the counter level 2 cache: a tomato in the refrigerator level 3 ca
by daly 10y ago
Suppose you want to make a salad.
register: a tomato in your hand
level 1 cache: a tomato on the counter
level 2 cache: a tomato in the refrigerator
level 3 cache: a tomato at the store
main memory: a tomato on the plant at the farm
disk: a tomato seed being planted
- milcron 10y agoYou need two newline characters for HN to put the text on a new line.
- drwl 10y agoThe post the author wrote goes more in depth than this. Per your analogy, it doesn't quite explain if multiple people (cores) want to make a salad. For example, how does the tomato on the counter and refrigerator get allocated?
- posterboy 10y agoIt's probably over the top of many heads, so a simple explanation is probably what they expect from the title.
- drwl 10y agoI'm confused, are you referring to the answer to the thread question or to the article's explanation?
- posterboy 10y agoObviously the few sentence answer here is much simpler than the (reposted) over my head article discussing cache strategies. If the article contains the answer, it's not up front. It starts with a quote that goes along the lines of "I know why cache is necessary ...", so then I didn't read much further to find out if the explanation will be repeated, because I remember reading the article before. I jumped to the conclusion that the necessity for a cache also explains the necessity for caches of caches. Edit: I was trying to say, the in depth explanation there and the ad-hoc hint given here both have their place. On the other hand, maybe not, if one should read the article first, but who does that, right? /s
- nabla9 10y agoThis analogy is not explaining why. Why not just make more hands? Why multiple levels?
- taneq 10y agoHands cost a lot more than benchtop space, which costs a lot more than cupboard space, which costs a lot more than supermarket space.
- seanmcdirmid 10y agoWe are limited to two hands. The kitchen can only hold so many tomatoes and other things you need to cook. You could buy all the produce you needed for the year and store it at your house, but it is wasteful (you actually don't need it, storing it is expensive, and it displaces other things you need in your house like your toilet). In the old days, humans would live near their wild food and not cache much. Then the Neolithic revolution happened, we started caching seeds and then surplus produce in cities, and eventually refrigeration came along and we could cache more. Each new level of caching allowed us to do more (increase population). Ya, we could still live as hunter gatherers, but we would be doing less. We could still be using Eniacs, also, we would just be computing slower.
- xxs 10y agoMore hands - Imagine the brain power required to coordinate more than 2 hands. It's already really hard to do two separate tasks. (You may also ask why not slice and dice a couple of tomatoes simultaneously) Add the energy allocated just for the brain and vascular system and you'd understand why having a tomato onto the table is way simpler.
- posterboy 10y agoThe right analogy would be bigger hands. Another reason than already mentioned IIRC is the connection on the cpu, it's a problem of geometry: Access speed decreases with physical distance on the core. The other problems might be neatly visualized with geometric examples as well, but I'm not sure I understand them right. I'm comfortable to assume it's black magic, when fgiesen aka ryg is talking about it.
- kondro 10y agoPlease don't put your tomatoes in the refrigerator. Now you've gone and corrupted them.
- dpark 10y agoThis is a myth unless you eat all your tomatoes in a day or two. http://www.seriouseats.com/2014/09/why-you-should-refrigerate-tomatoes.html http://www.seriouseats.com/2014/09/why-you-should-refrigerat...
- kondro 10y agoI will reserve judgement. This wasn't a particularly great experiment to disapprove one with a lot more scientific rigour.
- dpark 10y agoI'm not aware of any rigorous experiments that demonstrate that tomatoes are better left at room temperature than in a refrigerator. The French study referenced indicates that volatiles are reduced (no surprise) but that the effect is partially negated by allowing them to come back to room temperature before consumption. From what I can tell, this study does not compare quality of tomatoes left at room temperature for days to refrigerated tomatoes. The article I linked did a more in-depth comparison and still came to the same conclusion. http://www.seriouseats.com/2014/09/tomato-taste-test-refrigerate-tomatoes-furtther-testing-results.html http://www.seriouseats.com/2014/09/tomato-taste-test-refrige... I don't consider 2 separate testings with 16 subjects to be a poor experiment. Could it be even better? Sure. Is it a lot more rigorous than the anecdotal claims people propagate about refrigerated tomatoes? Absolutely.