一般来说,高速缓存是有用的,因为处理器的速度高于 ram 的速度(它们都在增加速度,但差异仍然存在)。因此,减少内存访问次数对于提高性能是可取的。
我的问题是为什么我们需要多级缓存(L1、L2、L3)而不是一个?
我知道 L1 是最快和最小的,L2 有点慢但有点大等等......但他们为什么要以这种方式创建硬件?
memory cpu performance cpu-architecture cpu-cache
cpu ×1
cpu-architecture ×1
cpu-cache ×1
memory ×1
performance ×1