CPU Runtime from Instructions, CPI and Clock Speed
Estimate processor time in seconds from millions of instructions, average cycles per instruction and the effective clock speed in GHz.
Formula & assumptions
Seconds = instructions × cycles per instruction ÷ clock frequency in hertz.
Use the effective average CPI for the measured workload and the same processor clock domain.
Worked example
- Instruction count (millions)
- 1500
- Average cycles per instruction
- 2
- Clock speed (GHz)
- 3
- Execution time
- 1 s
Interpreting the result
For the same instruction count, doubling both the clock speed and the average cycles per instruction leaves the execution time unchanged.