Processor with a higher IPC vs Processor with lower IPC but specific instructions

Context: Intel and AMD have long been fierce competitors in the CPU industry. As of late, AMD seems to have managed to make processors with a higher IPC on a single core than Intel (e.g. the Ryzen 5000 series).

Say we have the following scenario (the numbers are obviously just for demonstration)

The workload: 1000 instructions doing X
Intel CPU IPC: 10, but Intel CPU is good at specifically doing instruction X (<- Is this even possible?)
AMD CPU IPC: 20

Will the AMD CPU always complete this workload faster? Or can a CPU with a lower IPC actually complete certain workloads faster than a CPU with a higher IPC if the instructions that comprise the workload run faster on a given CPU?

Or do CPU instructions run at the same speed across Intel/AMD CPU's?


Solution 1:

The underlying architectures are completely down to the manufacturer and in all likelihood there are indeed instructions that may well work better on one manufacturer than the other.

In general though if there is a performance difference it is not likely to be huge, both companies have very smart engineers after all, and the difference is likely to be drowned out by other instructions having benefits for the other team.

AMD could simply be pushing more execution units into a core to boost IPC. A "core" is a collection of units that in modern CPUs can operate on different instructions simultaneously.

If you are interested in the general architecture of modern CPUs I would recommend Wikichip. They have a lot of cool information on the functional blocks of modern CPUs. Zen2 for example has a block diagram showing a general picture of how a core functions.

Solution 2:

This may make an impact but it would probably be incredibly close, probably not double the speed so the amd would probably be faster in your scenario, also ipc is instructions per cycle so if one has a higher clockspeed that’s probably more impactful And very few workloads will be one single instruction