A graphics processing unit (GPU) is built to handle many operations at once. Its thousands of simple processing units can work on separate pieces of data in parallel, making it a strong fit for tasks such as calculating colors for millions of pixels. section 1.6
A GPU is most useful when a problem offers plenty of independent, similar work with regular memory access. The CPU usually runs the main program and handles tasks that favor low latency or complex logic; the GPU takes on large parallel jobs where throughput matters. Dependencies between tasks and sequential parts of a program limit the benefit of adding more processing units. section 1.10 section 1.0
Common workloads that fit GPU-style parallelism include:
- Rendering pixels and processing images. section 1.6
- Matrix math used in AI training. section 1.6
- Applying the same operation to many values, such as summing millions of numbers. section 1.0
Table 1.2 Contrasting CPU and GPU design philosophies.
|
|
CPU (Master
Chef)
|
GPU
(Thousand Cooks)
|
|
Cores
|
6–24 on
typical desktops
|
Thousands
of simple processing units
|
|
Design Goal
|
Low Latency
(Finish each task fast)
|
High
Throughput (Finish many tasks at once)
|
|
Analogy
|
A chef
preparing a complex 7-course meal
|
1,000
workers rolling 1,000 burritos at once
|
|
Best For
|
OS, Web
Servers, Complex Logic, and any single-threaded task where one fast core wins
|
Matrix
Math, Image Processing, AI, and many more parallel patterns you’ll discover
in this book
|
Compare the CPU’s focus on finishing individual tasks quickly with the GPU’s focus on completing many tasks at once. section 1.6


















