Compilers can have a profound impact on the performance of an application. Assume that for a program, compiler A results in a dynamic instruction count of 1.0E9 and has an execution time of 1.1 s, while compiler B results in a dynamic instruction count of 1.2E9 and an execution time of 1.5 s.

Respuesta :

Incomplete question as we have not told what to find.So I have assumed to find average CPI for each program.So complete question is here

Compilers can have a profound impact on the performance of an application. Assume that for a program, compiler A results in a dynamic instruction count of 1.0E9 and has an execution time of 1.1 s, while compiler B results in a dynamic instruction count of 1.2E9 and an execution time of 1.5 s.

Find the average CPI for each program given that the processor has a clock cycle time of 1 ns.

Answer:

[tex]CPI_{A}=1[/tex]

[tex]CPI_{B}=1.25[/tex]

Step-by-step explanation:

As we know CPU time given as

[tex]CPU_{time}=instructions*CPI*Cycle_{time} \\So\\CPI=\frac{CPU_{time}}{instructions*Cycle_{time}}\\ Where\\Cycle_{time}=1*10^{-9}s\\ And\\executionTime=CPUtime[/tex]

For Compiler A

[tex]CPI_{A}=\frac{CPU_{timeA} }{instruction_{A}*Cycle_{time} }\\CPI_{A}=\frac{1s}{10^{9}*1.0*10^{-9}s }\\CPI_{A}=1[/tex]

For Compiler B

[tex]CPI_{B}=\frac{CPU_{timeB} }{instruction_{B}*Cycle_{timeB} }\\CPI_{B}=\frac{1.5s}{(1.2*10^{9})*(1.0*10^{-9}s) }\\CPI_{B}=1.25[/tex]