Why is it not solved in this way:
Fraction of non-branch instructions = 0.75
Fraction of branch instructions = 0.25
CPI of non-branch instructions (ideal CPI) = 1
CPI of branch instructions = (0.75 * 1 + 0.25 * 10) = 3.25, since 75% instructions don’t lose cycles due to correct branch predictions
Avg. CPI with pipelining = 0.75 * 1 + 0.25 * 3.25 = 1.5625
CPI without pipelining = 5
Speedup = 5 / 1.5625 = 3.2