This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Instructions per cycle" – news ·newspapers ·books ·scholar ·JSTOR(February 2008) (Learn how and when to remove this message) |
Incomputer architecture,instructions per cycle (IPC), commonly calledinstructions per clock, is one aspect of aprocessor's performance: the average number ofinstructions executed for eachclock cycle. It is themultiplicative inverse ofcycles per instruction.[1][2][3]
While early generations of CPUs carried out all the steps to execute an instruction sequentially, modern CPUs can do many things in parallel. As it is impossible to just keep doubling the speed of the clock,instruction pipelining andsuperscalar processor design have evolved so CPUs can use a variety of execution units in parallel – looking ahead through the incoming instructions in order to optimise them. This leads to theinstructions per cycle completed being much higher than 1 and is responsible for much of the speed improvements in subsequent CPU generations.
The calculation of IPC is done through running a set piece of code, calculating the number of machine-level instructions required to complete it, then using high-performance timers to calculate the number of clock cycles required to complete it on the actual hardware. The final result comes from dividing the number of instructions by the number of CPU clock cycles.
The number ofinstructions per second andfloating point operations per second for a processor can be derived by multiplying the number of instructions per cycle with theclock rate (cycles per second given inHertz) of the processor in question. The number of instructions per second is an approximate indicator of the likely performance of the processor.
The number of instructions executed per clock is not a constant for a given processor; it depends on how the particularsoftware being run interacts with the processor, and indeed the entire machine, particularly thememory hierarchy. However, certain processor features tend to lead to designs that have higher-than-average IPC values; the presence of multiplearithmetic logic units (an ALU is a processor subsystem that can perform elementary arithmetic and logical operations), and short pipelines. When comparing differentinstruction sets, a simpler instruction set may lead to a higher IPC figure than an implementation of a more complex instruction set using the same chip technology; however, the more complex instruction set may be able to achieve more useful work with fewer instructions. As such comparing IPC figures between different instruction sets (for example x86 vs ARM) is usually meaningless.
The useful work that can be done with any computer depends on many factors besides the processor speed. These factors include theinstruction set architecture, the processor'smicroarchitecture, and the computer system organization (such as the design of thedisk storage system and the capabilities and performance of other attached devices), the efficiency of theoperating system, and the high-level design ofapplication software.
For computer users and purchasers, applicationbenchmarks, rather than instructions per cycle, are typically a much more useful indication of system performance. However, IPC does provide an example of whyclock speed is not the only factor relevant to computer performance.