Originally posted by: hippotautamus
2. What is the "pipeline" that is referred to so often in AMD vs. Intel threads? Why is a shorter one better than a longer one?
Pipelining is like dividing up a task into several stages. I'll give the most typical response to #2. Imagine you're doing your laundry and typically you need to do the following.
2) Wash clothes (10 minutes)
3) Rinse clothes (10 minutes)
4) Dry clothes (10 minutes)
Let's say you have a machine that will do all that so you toss in a batch of clothes and in 30 minutes it'll pop it out. That is a 1-stage pipeline and you have to wait 30 stages before doing the next batch of clothes so doing 3 batches of clothing will take 90 minutes.
Now let's say you divide up the machine into 3 parts. So you toss in a batch, it washes it in 10 minutes and moves that batch to the rinser. You can then put in another batch of clothes in the washer in the meantime. So you'll be able to do more things in quasi-parallel in this fashion.
0 minutes: 1st batch is washing
10 minutes: 1st is rinsing, 2nd is washing
20 minutes: 1st is drying, 2nd is rinsing, 3rd is washing
30 minutes: 2nd is drying, 3rd is rinsing
40 minutes: 3rd is drying
50 minutes: DONE
So it's not necessary true that all shorter pipelines are better than long pipelines. A 1-stage pipeline would be the slowest thing on earth. However, if you have insanely long pipelines, let's say you have 30 machines, each taking 1 minute to finish, you'll be spending so much overhead time of moving one batch to the next that it's not really giving you much return.
In addition, if something happens in one of the stages, you have to take everything out and start over and so you will have a large penalty. So there is a 'sweet spot' in how long a pipeline should be.