CPUs are fast, but GPUs are faster!
Using the Julia programming language, specifically while working through this introduction to GPU programming with Julia, let’s compare the performance (in time) of running the same computation sequentially on the CPU, in parallel on the CPU and in parallel on the GPU.
But before we continue, here are specs of the computer system we are running on:
Here are the sequential and parallel results on the CPU:
and here is the same computation being run on the GPU (using OpenCL):
…here is a table format of the results:
Time | |
---|---|
Sequential, CPU | 183.325μs |
Parallel, CPU | 55.475μs |
Parallel, GPU | 2.701μs |
…WOW is the GPU fast!
…and go read some history on what made this all possible.
Thank you Julia programming language community and ecosystem for making all this possible (and very enjoyable).