Silly commenter.
L1 cache shouldn’t be large. Increasing the size of the L1 cache increases the latency. Maybe if you shrink the size of the cloths you wear you can squeeze more into the chair, but the ideal L1 cache has to minimize it’s distance from processing. Oversizing adds latency.
Your L2 cache is where you generally try and shove a much bigger cache into it, but it’s still got a size constraint for the latency you are after. Further, typically L1 and L2 only serve 1 CPU. To multi-process stuff you’ll typically need an even larger L3 cache which is shared among cores.
So the cloths on your chair should be minimal for fast access (L1). You can put more cloths on your bed and dressers or in laundry baskets that can be promoted to the chair if you start needing them more often (L2). You can throw a bunch of cloths into a pile in the corner which sit there for a few years and serve many occasions (L3).
The worst thing is going back to main memory (your closet) to search for specialty cloths you are ultimately going to need to send back to the closet. And heavy help you if you have to swap (do laundry).
Moms are binary. There are only clean and dirty clothes. Kids are ternary: clean, usable and dirty.
Once my son hit 14 …. It just became “his laundry” instead of clean or dirty.
Wouldn’t a pile of clothes have O(n) complexity? They’d still have to go through them one at a time unless the clothes have a really distinct color/shape and are in a somewhat tidy pile s.t. they can be pulled from anywhere.
Items are in a hash table using color/material type/shape as the hashing method optimized for human pattern recognition providing O(1) access. The table is smaller than the number of items causing some collisions. Those items are in a randomly sorted vector. Average case is still around O(1) with an O(n) worst case.
A well organized drawer or cabinet should still be O(1). It takes at least 2 more steps, assuming you don’t leave them open all the time, but the number of operations doesn’t change depending on the number of clothing items you need to retrieve.
A pile of clothes is faster, but only for a small number of items. As the number of articles pile up, they hide older items and need to be pushed side before the intended article can be found and then retrieved. This is now O(N), and less efficient than just storing things in the proper place…
so like, my wife and i kept disagreeing on my cache. in part because she didn’t know what i was doing, in part because i hadn’t told her explicitly what i was doing. for example, i like to rewear my jeans a few times until they are dirty enough to need washing. i was hanging them on the side of the laundry basket. and would flip and fold and hang them differently to indicate how many times i had worn them i case i had forgotten because my brain is a rusty sieve lately.
You’re saying this as if there isn’t multiple piles mixed fresh and dirty clothes with an O(n^2) complexity to find something you want.
I personally prefer to have my clothes indexed in an ordered storage so I know exactly which row in the drawers clean shirts are in.
That makes me think of how much it annoys me when things are really messy and disorganized in our house, which is very often.
It’s like there’s no indexing. Where is thing X that somebody else used last? Time to start a fresh empty-cache brute force search of the whole space!
Unironically this. In a related note, most people confuse “tidy”, which is about aesthetics, with “organised” that is about efficiency. That’s why my long term storage is extremely tidy, and my short term storage (mostly my desk, and a small table next to it) looks like a modern art installation.
Ah, so my problem is actually that I just fail to put things into long-term storage.







