Previous | Next --- Slide 11 of 47
Back to Lecture Thumbnails
zhanpenf

Is there a formula to calculate or approximate the speed up of a pipeline?

TDollasAKATMoneys

I would also like to know about this.

andrewwuan

Taking a shot here, please correct me if I'm wrong :)

I think an important observation here is that, the total time wasted waiting equals to:

max(TL - T1, 0)

where TL represents the longest segment in the pipeline, and T1 represents the first segment in the pipeline. After we have this value, it's easy to calculate speedup:

T / (T1 + max(TL - T1, 0))

which simplifies to:

T / TL, when TL > T1

T / T1, when TL <= T1

where T is the total time spent on the pipeline when it's executed without pipelining.

To demonstrate, think about the washing machine example in lecture: if both drying and folding take less time than washing, then none of the time are spent waiting on resources except for the washing machine. The speedup we get is thus (T / T1). However, if dryer takes longer than washer, the speedup decreases, and becomes (T / TL).