ITPEC FE Morning October 2021 Question 19

A processor takes 15 seconds to run an application compiled with an old compiler. A new compiler was released. The same application compiled with the new compiler executes fewer instructions by 40%, but the average clock cycles per instruction (CPI) is increased by 10%. How many seconds does it take for the same processor to run the same application compiled with the new compiler?

Explanation

9.9 seconds — execution time = instruction count × CPI × clock cycle time, and on the same processor the cycle time does not change.

  • •Instruction count falls by 40%: factor 0.6
  • •CPI rises by 10%: factor 1.1
  • •New time: 15 × 0.6 × 1.1 = 9.9 seconds

Answer (d)

Why not others:

  • •(a) 4.125 — less than a third of 15 seconds; with 60% of the instructions and a higher CPI the time cannot fall below 15 × 0.6 = 9 seconds
  • •(b) 6.6 — 15 × 0.4 × 1.1: keeps the 40% that was removed instead of the 60% of instructions that remain
  • •(c) 9.09 — only 1% above the 9 seconds the instruction cut alone gives, while a 10% higher CPI adds 10%

Key rule: When factors of a product change, multiply by the new share of each: "fewer by 40%" leaves 0.6 and "increased by 10%" makes 1.1.

Computer Component · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.