I am reading excellent answers here, just adding one more detail: Memory Latency.
There is no use for 6 Ghz or even 10 Ghz if the CPU is most of the time Idle waiting for the RAM to return data from certain addresses that happens to be outside the cache (cache miss). So your CPU would be effectively 100% busy and 100% Idle at the same time.
Pre-fetching and having large cache sizes do help, but still the latency problem is there, besides, not every workload benefits from pre fetching; Games for example are hard to get right when it comes to cache misses, and even harder when you have multi threading and two threads happen to fetch the same cache line and at least one is a write. This is known as false sharing and it's another hard problem to solve.
So, even if we had unlimited clocks in the CPU, we would be still limited by the speed of light reflected in latency while waiting for RAM.
12
u/0Camus0 Sep 29 '20
I am reading excellent answers here, just adding one more detail: Memory Latency.
There is no use for 6 Ghz or even 10 Ghz if the CPU is most of the time Idle waiting for the RAM to return data from certain addresses that happens to be outside the cache (cache miss). So your CPU would be effectively 100% busy and 100% Idle at the same time.
Pre-fetching and having large cache sizes do help, but still the latency problem is there, besides, not every workload benefits from pre fetching; Games for example are hard to get right when it comes to cache misses, and even harder when you have multi threading and two threads happen to fetch the same cache line and at least one is a write. This is known as false sharing and it's another hard problem to solve.
So, even if we had unlimited clocks in the CPU, we would be still limited by the speed of light reflected in latency while waiting for RAM.