The cycle is the basic unit of execution, is the minimum step of execution that occurs and the time between one and the other is defined by the mechanism of clock from the computer, so a 4Ghz computer runs about 4 billion cycles in a second. I time between each is obviously the second divided by the number of cycles per second.
Instruction is an operation that performs something that makes sense to the computer and to a human. It’s something that commands the computer to manipulate data in a certain way. It can be an arithmetic, relational calculus, a movement of data in registers and memory, or something like that. It does a minimal full operation.
What I understood to be the IC in this context is the total instructions of a given code, so I would be teaching to calculate a theoretical execution time.
There are architectures that all instructions run with the same amount of cycles and others where each instruction has its own cost, and even the same instruction can vary in each run. In the cases that the cost varies this measure can be an average, just do not know average that since it depends on the context of where you are measuring.
I imagine that this average in this context is calculated by adding up the number of cycles of each of the instructions of the code being observed by dividing by the number of instructions. But part of the equation is multiplying by the number of instructions, so you shouldn’t use the mean, you should just use the sum of cycles. Wikipedia has a formula that you can understand better.
Otherwise I don’t know what that equation is for.
Even using the Wikipedia formula may not work on the architectures that the actual running will determine how many cycles you consume in a given instruction. And depending on the context can be worse, by a number of optimizations that can occur. Theory is useful, but there are cases that it has no relation to practice.
I do a lot of optimization and have never had to do this calculation :) I needed others you might see in these classes. It may be that on a lower level I need the formula (from Wikipedia).