If the M1 has a max speed of 3.2GHz how is it faster than my 2017 iMac i7 that maxes at 4.2 GHz? My specs are in my signature. Obviously, I'm not understanding. Please educate me.
What makes a CPU fast? What GHz tells you is the clock speed of the CPU. That is NOT the same thing as how many instructions the CPU executes in a second.
(a) Modern CPUs are superscalar, meaning they can execute more than one instruction per cycle. Intel can (under the best conditions) execute 5 per cycle. M1 can (under the best conditions, which occur a lot more frequently) execute 8 per cycle.
(b) Even though these peak numbers are important, much of the time the CPU executes many fewer than that instructions per cycle. The reasons include branch mispredictions, or the CPU has to halt while it is waiting for data to be brought in from RAM.
Apple has substantially better branch predictors than Intel.
Also modern CPUs use out-of-order technology to try to continue processing other instructions while waiting for data to be brought in from RAM (or from an outer level cache). Apple's OoO technology is vastly superior to Intels along every dimension -- much larger ROB, many more physical registers, larger (and more importantly late allocation/early release load store queues, etc.
Intel (averaged over a range of code) has an IPC (instructions per cycle) of around 1.75. (That's Skylake, might be around 2 for the new Willow Cove designs).
Apple has an IPC of about twice that, so around 3.5, with a few "obvious" way that they could boost that to at least 4 in the next design, based simply on optimizing their existing micro-architecture.
(c) Apple has lower latency execution in a number of ways. Many instructions are "executed" at Decode, Map or Rename (ie within the in-order front-end). Intel does this with the stack engine, but Apple does it with
- simple branches
- moves
- immediates
- some value prediction (for loads)
There's much much more to say, but this gives the basic idea.
Intel has shorter cycles, but Apple does a LOT MORE WORK in a given cycle. And overall doing more work in a slightly longer cycle
- averages to better performance
- uses a LOT less power
- uses a lot less area (many more transistors, but the transistors can be a lot smaller -- fast transistors are BIG)
- is a much better match to where semiconductor technology is heading (honestly smarter but lower GHz has been the obvious direction of technology since the late 2000s; most of Intel's current problems stem from the fact that they refused to adapt themselves to this new reality)