CPU freq affects your average IPC because your memory doesn't go faster together with CPU.
That is NOT how this works, except as Andrei pointed out on how memory can effect IPC with changes to core frequency.
Let's do an example:
IPC is 10 instructions per cycle, and you run at 4GHz.
10 IPC * 4,000,000,000 = 40,000,000,000 Instructions per second.
Let's now say IPC is 12, but the speed is only 3.6GHz
12 IPC * 3,600,000,000 cycles per second = 43,200,000,000 Instructions per second.
Increasing CPU speed, if perfectly controlled for with other variables, works in this way. It increases the number of cycles per second, not effecting the IPC. If I left the IPC at 10, but reduced the frequency to 3.6, it would produce 36,000,000,000 Instructions per second.
What Andrei referred to below is that you cannot always control for other factors, like the memory subsystems, effects on cache and cache latency, etc. But that is a more advanced and nuanced statement than yours, which is that CPU freq effects the average IPC because your mem doesn't go faster together with cpu, to modify the quoted statement from you.
I don't know what's funny because 1 CYCLE = 1 CLOCK CYCLE. Power budget is not a consideration in an IPC test. Jesus!!
I'm happy you said this, at least, and not that IPC is determined by power budget.
This is easily solved by making sure the memory subsystem is not a bottleneck in your test. Or, you could simply stick to manufacturer specs.
See explanation above and discussion with Andrei below.
I was always curious of this notion so today I quickly tested with CPU-z to check if the myth stands (on a 8700k):
View attachment 9143
There's at best a 2% difference in scores running from 4.5 to 2.5 GHz fixed in bios, same RAM speed and timings. Myth busted?
Well for this benchmark sure, maybe at 5GHz it decreases noticeably but I won't test that with my crappy cooling… anyone interested open another thread and find out with more benches, also more CPUs!
Yes CPU-Z and CB - both known to have tons of memory pressure amirite?
IPC should only be measured at peak performance of a chip because that's the only data-point that matters. Everything below that will artificially inflate IPC because you're essentially improving memory cycles by an equal amount to the clock reduction.
Thank you for actually addressing why there is a variance in the IPC here. Because I have been trying to get the basics through to them on IPC being instructions per cycle and frequency being cycles per second BEFORE I complicated it with explanations on how cache and memory frequency, latency, etc., can effect IPC. In other words, trying to build the foundation, followed by going into other factors that effect IPC that are harder to control for.
Now, although using peak frequency can be preferred to measure IPC due to the other factors you mention, CPU boost behaviors must be considered as well, and if the CPU frequency is changing throughout the testing of IPC, you get the problem of averages, which can actually give a worse image of IPC. So long as the frequency is fixed at that peak, I have no problem with the characterization. But you also understand the reasons that they fix all the CPUs to a single frequency that all of them can achieve for comparison purposes as well. It is a give and take for testing IPC, and there are issues with each method. But, taking a known instruction set with a set number of instructions, running it at a single frequency, and accurately measuring the time to completion will allow for the determination of the number of instructions per cycle. Unfortunately, not all of the software used in daily life has an ability to accurately, down to ms or ns, measure the time to completion, even with a known workload. You also can complicate things further when software selects a different instruction set based on the CPU available. So it can be difficult to fully control, but not impossible.
Edit: and for those that don't understand the difference between Andrei's answer and others, he is NOT saying clock Frequency is effecting IPC, he IS saying that the
relationship of frequency to other systems, here being the change in relative memory cycles to the CPU clocks, can effect the IPC, which is a more nuanced statement. It is NOT the frequency, by, in, and of itself that is changing the IPC. That is an important distinction.
This is also why I mentioned controlling for memory frequency, meaning controlling memory bandwidth and latency, if being more correct, is important for testing IPC, which can effect the ability of keeping the cores fed and can change the bandwidth and latency of cache to a degree, something that cannot fully be divorced/controlled for from the IPC calculation (meaning that changes that effect those systems can effect the determined IPC of a CPU).