Content deleted Content added
Tags: Mobile edit Mobile web edit |
m →Definition: fix typesetting for multi-letter variables. add a link to weighted average. [typo, +lk] |
||
Line 2:
In [[computer architecture]], '''cycles per instruction''' (aka '''clock cycles per instruction''', '''clocks per instruction''', or '''CPI''') is one aspect of a [[central processing unit|processor]]'s performance: the average number of [[clock cycle]]s per [[Instruction (computer science)|instruction]] for a program or program fragment.<ref>{{cite book |title=Computer Organization and Design: The Hardware/Software Interface|url=https://archive.org/details/computerorganiza00henn|url-access=registration|first=David A.|last1=Patterson|first2=John L.|last2=Hennessy|year=1994|isbn=9781558602816}}</ref> It is the [[multiplicative inverse]] of [[instructions per cycle]].
== Definition ==
The average of Cycles Per Instruction in a given process ({{math|CPI}}) is defined by the following [[Weighted arithmetic mean|weighted average]]:
: <math>
\mathrm{CPI} := \frac{\Sigma_i(\mathrm{IC}_i)(\mathrm{CC}_i)}{\mathrm{IC}} = \frac{\Sigma_i(\mathrm{IC}_i \cdot \mathrm{CC}_i)}{\Sigma_i(\mathrm{IC}_i)}
</math>
Where <math>
==Explanation==
|