Basis Lab

Why a GPU Is Built This Way

The Same Chip Buys One Worker at Speed Four or Sixteen at Speed One

A chip is a fixed budget. Spent on one stream of instructions it buys a little speed at a high price. Spent on plain workers it buys output, on the right job.

A fixed budget of chip

A chip has a fixed area and may draw a fixed amount of power. Everything on it is paid for out of that budget, so the useful question about any chip is what the budget was spent on.

A processor spends most of it on making one stream of instructions finish sooner. It guesses which way each decision will go, runs instructions out of order when the order does not matter, and keeps recently used data in fast storage close by. The course What Makes Code Fast covers that machinery. None of it does arithmetic. It exists so that the few units which do are almost never kept waiting.

A GPU makes the opposite choice. NVIDIA's CUDA Programming Guide (2026 edition) puts it in one sentence: a GPU devotes more transistors to data processing, where a processor dedicates them to data caching and flow control. The same guide gives the scale: a processor runs a few tens of streams at once, a GPU thousands. This lesson works out what each choice buys.

What speed for one stream costs

Measure the budget in units, where one unit is the chip a single plain worker needs. A plain worker runs one stream of instructions at speed 1.

Spending more units on one worker makes it faster, but not in proportion. The standard analysis (Hill and Marty, 2008) assumes that a worker built from rr units runs one stream at a speed of about r\sqrt{r}. That is a modelling assumption, a rule of thumb about how designs have turned out and not a law, and this course uses it as one. Four units buy a speed of 2. Sixteen buy a speed of 4.

FIG 1What a budget buys, spent two ways
0.0020.0040.0060.0080.001.016.832.548.364.0units of chip in the budget
many plain workers, one unit eachone worker built from the whole budget
Both lines start together at a budget of one unit. The straight line is plain workers adding up. The bending line is one worker under the square root rule: each further unit buys less speed than the one before, so the gap between the lines widens for as long as the budget grows.

The bend in the lower line is the whole reason a GPU exists. The sixteenth unit spent on the big worker raises its speed from 15\sqrt{15} to 4, a gain of about 0.13. The same unit spent on a new plain worker adds 1.

The output of each design

Take a budget of 16 units and build both machines. Design A is one worker at speed 4. Design B is sixteen workers at speed 1 each.

Give them a job of 4,800 items. Each item takes one second on a plain worker, and no item needs anything from another. Design A works through them one at a time at four a second and takes 1,200 seconds. Design B gives every worker its own share and finishes sixteen a second, so it takes 300 seconds.

FIG 2How far the many are ahead
units of chip in the budget
speed of one worker built from all n units, which is also the ratio between the two designs
The top of the fraction is the total speed of n plain workers and the bottom is the speed of one large one. At 16 units the ratio is 4, which is the 1,200 seconds against the 300. The ratio is a property of the budget and it holds only while every worker has an item of its own to work on.
FIG 3The same sum at larger budgets
speed of one large workertotal speed of plain workershow far the many are ahead
16 units4164
64 units8648
256 units1625616
1,024 units32102432
The first marked cell is the worked example. The second is the scale the vendor's guide describes, thousands of workers, where the many are ahead by a factor of about thirty. Every row assumes a job with at least as many independent items as there are workers.

The job decides

Now change the job and nothing else. It is still 4,800 seconds of work for a plain worker, but it is a chain: step two needs the result of step one, step three the result of step two, and so on to the end.

Only one worker can be busy on a chain, because every other step is waiting for a result that does not exist yet. Design A takes 1,200 seconds as before. Design B takes 4,800, with one worker running at speed 1 and fifteen idle.

FIG 4Two jobs on two designs
stepjobdesign A, one worker at speed 4design B, sixteen at speed 1which finishes firstwhat happened
14,800 independent items4,800 / 4 = 1,200 s4,800 / 16 = 300 sB, by 4Every worker in design B has its own items, so their speeds add.
2a chain of 4,800 steps4,800 / 4 = 1,200 s4,800 / 1 = 4,800 sA, by 4A chain occupies one worker. Design B is reduced to a single slow one, and the fifteen others contribute nothing.
2 steps
Same chip budget, same amount of work, and the winner swaps by the same factor of four. Nothing about either machine changed between the rows. The only difference is whether the items of the job depend on each other.

So the factor of n\sqrt{n} cuts both ways. Design B wins by it when the job is made of independent items and loses by it when the job is a chain. A real job is a mixture of the two, and the lesson after next works out what the mixture does.

The comparison above also hides something. Design B finished the first job sooner, yet every single item in it took four times longer than on design A. Whether that matters depends on what is being asked of the machine, and it is the subject of the next lesson.

Recap

  • A processor and a GPU are two ways of spending the same fixed budget of chip area and power, one on finishing a single stream of instructions sooner and the other on many plain workers.
  • Under the usual rule that a worker built from r units of chip runs about the square root of r times as fast, a budget of n units yields a speed of root n as one worker and a total of n as many, so the many win by a factor of root n on independent items.
  • The same sixteen workers that finish 4,800 independent items four times sooner than one fast worker finish a chain of 4,800 dependent steps four times later, because only one of them can work on a chain.

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

NextTime for One, Rate for All →

The rest of this course

  1. 01The Same Chip Buys One Worker at Speed Four or Sixteen at Speed Oneyou are here
  2. 02Why a Machine Can Be Four Times Slower and Four Times Faster at Onceopening only
  3. 03Five Seconds That Will Not Divide Cap a Thousand Workers at Twenty Timesopening only
  4. 04Thirty-Two Workers Share One Stream of Instructions, and One Dissenter Stalls Them Allopening only
  5. 05How a GPU Stays Busy While Every One of Its Workers Is Waiting for Memoryopening only
  6. 06How Big a Job Must Be Before Sending It to the GPU Pays for the Journeyopening only
  7. 07Three Numbers on a GPU Data Sheet and How to Tell Which One Limits Your Jobopening only
  8. 08Four Kinds of Job a GPU Does Worse Than the Processor Beside Itopening only

Read alongside