From WikiChip
Difference between revisions of "runtime"

(Created page with "{{title|Runtime}} '''Runtime''' or '''run time''' or '''execution time''' is the total duration a program is executing.")
 
 
Line 1: Line 1:
 
{{title|Runtime}}
 
{{title|Runtime}}
 
'''Runtime''' or '''run time''' or '''execution time''' is the total duration a program is executing.
 
'''Runtime''' or '''run time''' or '''execution time''' is the total duration a program is executing.
 +
 +
== Overview ==
 +
The total execution time of a program is the length of time in which the program is executing. It is the product of the [[cycles per instruction]], the [[clock cycle]], and the total [[instruction count]] of the program.
 +
 +
:<math>
 +
\begin{align}
 +
T_\text{exec} &= \frac{\texttt{seconds}}{\texttt{program}} = \frac{\texttt{instructions}}{\texttt{program}} \times \frac{\texttt{cycles}}{\texttt{instructions}} \times \frac{\texttt{seconds}}{\texttt{cycle}} \\
 +
\\
 +
  &= \texttt{IC} \times \texttt{CPI} \times \texttt{clock} \texttt{cycle} \qquad \qquad [\frac{\texttt{seconds}}{\texttt{program}}]
 +
\end{align}
 +
</math>
 +
 +
Note that the reciprocal of execution time is the [[microprocessor performance|performance of the program]].
 +
 +
== See also ==
 +
* [[microprocessor performance]]
 +
* [[cycles per instruction]]
 +
* [[instruction count]

Latest revision as of 22:57, 4 January 2019

Runtime or run time or execution time is the total duration a program is executing.

Overview[edit]

The total execution time of a program is the length of time in which the program is executing. It is the product of the cycles per instruction, the clock cycle, and the total instruction count of the program.

Equation StartLayout 1st Row 1st Column upper T Subscript exec 2nd Column equals StartFraction monospace seconds Over monospace program EndFraction equals StartFraction monospace instructions Over monospace program EndFraction times StartFraction monospace cycles Over monospace instructions EndFraction times StartFraction monospace seconds Over monospace cycle EndFraction 2nd Row 1st Column Blank 3rd Row 1st Column Blank 2nd Column equals monospace IC times monospace CPI times monospace clock monospace cycle left-bracket StartFraction monospace seconds Over monospace program EndFraction right-bracket EndLayout

Note that the reciprocal of execution time is the performance of the program.

See also[edit]