Do instruction set and instruction count mean the same when calculating cpu execution time?
Normally "instruction set" is a name (e.g. "80x86", "ARMv6", ..) used to describe the range of instructions that the CPU supports. This influences the number of instructions you need to get a specific piece of work done. For example, some CPUs have an instruction for integer division and some don't; and if the CPU doesn't have an instruction for integer division you might have to execute a few hundred instructions each time you want to do an integer division; so a calculation like "x = y / 100 + 6;
" in C could end up being a small number of instructions or a huge number of instructions.
This is important when comparing the performance of different CPUs (with different instruction sets). For example; if a CPU can do twice as many instructions per second but needs 6 times as many instructions to do the same work; then that CPU is 3 times slower at doing work (despite being able to do more instructions per second).
If you have a formula like execution time = CPI * instruction count * 1/clock rate
, you'd have to determine how many instructions it takes to do a certain amount of work, and could (in theory) do this using a formula like instruction count = amount of work * instructions per unit of work
. Then you could combine the formulas to get execution time = CPI * amount of work * instructions per unit of work * 1/clock rate
.
In a similar way, if you have a formula like performance = amount of work / execution time
it could become performance = amount of work / (CPI * instruction count * 1/clock rate)
, which could become performance = amount of work / (CPI * amount of work * instructions per unit of work * 1/clock rate)
; which can be simplified to performance = 1 / (CPI * instructions per unit of work * 1/clock rate)
or performance = 1/CPI * 1/instructions per unit of work * clock rate
.
Note that in this final formula, instructions per unit of work
depends on which instruction set it is.
The problem you are having (based partly on your previous question) is that whatever you're trying to learn from is incorrectly using the words instruction set
when they actually meant 1/instructions per unit of work (that depends on which instruction set it is)
.