Quote Originally Posted by drfedja View Post
...that explains why profilers has IPC for measuring performance of code. If you have more ILP with code, IPC will be higher and peformance of code could be higher. (not neceserily higher)
Profilers use IPC because it is the more useful measurement. ILP is how many instructions could theoretically be executed in parallel given an idealized CPU. IPC is related to how many instructions actual hardware can execute simultaneously. Rather than some theoretical figure that doesn't really help, IPC is telling you how the code is playing out in real hardware.

Generally more ILP is good, but it's not a rule. ILP is just a measure of how many instructions can be executed in parallel, it doesn't tell us anything about how much useful work is being accomplished by those instructions. There are cases where a lot of parallel but simple instructions accomplish less than a few serial but more complex instructions (such as a bunch of individual math ops VS a single AVX or SSE instruction), or where a more efficient version of an algorithm (or one that is a better match for a given CPU's branch prediction capability, etc) has less ILP but still accomplishes a task faster than a less efficient algorithm. Again, this is why measuring the real performance of your code on actual hardware with a profiler is important.