Web & Dev

CPU vs GPU Comparison

How CPUs and GPUs differ — cores, parallelism, memory, and when to use each.

Architecture

AspectCPUGPU
Cores4–128 complex cores1 000s of small ALUs (SIMT)
Clock3–6 GHz1–2.5 GHz
PipelinesDeep, out-of-orderSimpler, in-order per lane
Branch predictionSophisticatedMinimal — divergence is costly
Cache per core32 KB L1 + MBs L2/L3~KB shared memory + L1
Memory b/w50–500 GB/s500–3 000 GB/s (HBM)
LatencyLow (~1 ns L1)Hidden by massive parallelism
Thread modelFew, heavy threadsWarps/waves of 32–64 threads

When each wins

WorkloadBetter
Serial / branchy codeCPU
OS, databases, compilersCPU
Matrix multiplies / neural netsGPU
Graphics, ray tracingGPU
Scientific sims (lattice methods)GPU
Small payloads, low latencyCPU
Large payloads, throughputGPU

Specialized accelerators

TPU (Google)Tensor Processing Unit — dense matmul, training/inference
Trainium / Inferentia (AWS)Cloud ML accelerators
NPUNeural Processing Unit — on-device ML (Apple, Qualcomm)
FPGAReconfigurable hardware for custom pipelines
DPUData Processing Unit — offload networking/storage
Was this article helpful?