CPUs and GPUs: a brief history
Chips are the brain of the computer. They, and the billions of little transistors that we’ve somehow figured out to put on them, are responsible for executing your code fast and reliably.
The CPU
The most popular type of chip is the CPU, or central processing unit. It’s the workhorse of most computers, and is probably working to display this post that you’re reading as we speak. And they’ve been getting faster and faster and faster, thanks to an age old observation called Moore’s Law that processing power seems to double every 2 years. The more transistors we fit on the chip, the faster it is.
To give you some more context to how far we’ve come: the first CPU ever developed was the Intel 4004, released in 1971. It has 2,300 transistors, and could perform 60,000 operations per second. The Apple M4 chip – today’s state of the art – has…wait for it… 28 BILLION transistors. Someone smarter than me can check my math, but I believe this is roughly a 12 million times improvement.
But it’s not just transistors – we’ve also figured out how to get more chips to fit into a computer. Laptops shipping today have 10 cores, which you can roughly translate to 10 chips. We’ve also gotten better at making these chips work together to get tasks done.
When you combine these two dynamics – more transistors and more chips working better together – you get much faster hardware. Readers graced by the sweetness of age will recall how incredibly slow computers of even 10 years ago were compared to the snappy experiences we have with modern laptops and servers.
The GPU
Powerful as the CPU is, it’s not perfect – like me, it has things it’s good at (writing) and things it’s not so good at (walking past a Shake Shack). CPUs are designed to do complex, intertwined computations in order. Think of it like a really long, convoluted checklist of things that have to happen in a specific sequence: that’s what most code looks like, and that’s what CPUs excel at. And for most of the tasks a computer needs to do, like swimming aimlessly through a sea of Chrome tabs, that’s exactly what you want.
But sometimes you need your computer to do the opposite: tons and tons and tons of very simple operations, but all at the same time. This is where GPUs come in.