This week I decided to reimplement some algorithms I had originally written many years ago at the beginning of my career. It was interesting to see what was the same and what was different.
The algorithms themselves were the same. But the experience of implementing them was surprisingly different.
Today programming languages are very different than they were when I was first starting out. For one thing, unlike when I first started programming, you now have the choice of implementing on the CPU or the GPU.
So I decided to implement the same algorithms for both CPU and the GPU, just to compare and contrast. It was fun to explore the complementary superpowers that you get within those two different programming worlds.
GPUs are all about raw power. For example, they make it super easy for you to manipulate vectors and matrices. In contrast, CPU programming is all about flexibility. For example, you can create and run a new function right in the middle of doing something else.
I suppose that one day those complementary superpowers will be gathered into a single programming environment, and then we will have it all. But until then it’s fun to keep one foot in each world.