Compilers can have a profound impact on the performance of an application. Assume that for a program, compiler A results in a dynamic instru

Question

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.

in progress 0
Evelyn 3 weeks 2022-01-08T04:28:45+00:00 1 Answer 0 views 0

Answers ( )

    0
    2022-01-08T04:30:33+00:00

    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:

    CPI_{A}=1

    CPI_{B}=1.25

    Step-by-step explanation:

    As we know CPU time given as

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

    For Compiler A

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

    For Compiler B

    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

Leave an answer

45:7+7-4:2-5:5*4+35:2 =? ( )