# Calculating speedup given rates and execution time percentage

1. Feb 3, 2012

### SpiffyEh

1. The problem statement, all variables and given/known data
a) If the new floating-point speeds up floating-point operations by, on average, 2x, the floating-point operations take 20% of the original program execution time, what is the overall speedup(ignoring the penalty to any other instruction)?

b) Now assume that speeding up the floating-point unit slowed down the data cache access, resulting in a 1.5x slowdown or 2/3 speedup. Data cache accesses consume 10% of the execution time. What is the overall speedup now?

c) after implementing the new floating-point operations, what percentage of execution time is spend on floating-point operations? What percentage is spent on data cache access?

2. Relevant equations
Amdhal's law: speedup = 1/((1-fraction_enhanced)+(fraction_enhanced/speedup_enhanced))

3. The attempt at a solution
a) I used amdhal's law and solved part a and ended up with 1.235 speedup

b) I understand what it's asking but I don't understand how to use amdhal's law with two different speedup/slowdowns. Is there a way to do this?

c) I have no idea how to solve this part

2. Feb 4, 2012

### Joffan

Can you show your working for section a) (ie. put numbers in the formula and solve by stages), because your answer is wrong.

Without ever having heard of Amdhal's law previously, I considered the case where the original execution time was 100s. From a), 20s of this was flops, and from b) 10s of this was cache access. Modifications to these numbers allowed me to calculate all the answers.