Thursday, 7 January 2016

Speedup and Amdahl's law

Speedup

The term speedup is used to describe how the performance of an architecture change as different improvements are made to it.
Speedup is just the ratio of execution times before and after a change is made.




Let's take an easy example. if a program takes 30 ms to run on old architecture and this architecture is being replaced by another, in which execution time is 15 ms, then we get 

speedup= (30 ms)/(15 ms)=2

This is the speedup if we are using a better version. If we replace our new architecture with older one, then the speedup obtained will be 1/2=0.5


If speedup=1, no improvement

speedup>1, system performance improves

speedup<1, system performance deteriorates


Amdahl's law

According to Amdahl's law,

Frac(unused) is the fraction of time (not instruction) that the improvement is not in use.

Frac(used) is the fraction of the time that improvement is in use and speedup(used) is the speedup that occurs when the improvement is used. 

From Amdahl's law, the thumb rule to improve the system is to improve the common case(instructions whose execution takes most time) first.


No comments:

Post a Comment