RAM is slow. Sure compared to your hard drive or even SSD it’s super fast, but from the processor’s perspective, it’s really slow. Anytime the CPU has to wait for data from RAM it’s just sitting idle waiting. To combat this CPUs have cache built directly into the chip that is much closer and much faster than RAM. Whenever it reads from RAM, it’ll first check if the data is in the cache and if it’s “fresh”, if the data is “stall” or missing, then it goes to RAM, but it’s it is fresh, then it can read the data from cache and save a lot of time. If the cache is successful even half the time, this could provide a huge performance boost to the application. CPUs and Operating Systems put a lot of effort into making this cache as useful as possible to keep the CPU running as optimally as possible.
Latest Answers