Low level optimization

I have been doing a lot of computer programming recently, and I am struck by how many of the same principles keep recurring. No matter what project you work on, some things always seem to be true.

One of those principles concerns optimization. Interactive computer animation needs to be fast. This is especially true when you are trying to compute a virtual reality scene at 90 frames per second for both a left and a right eye on a VR headset that’s not all that powerful, like the Oculus Quest.

So you’re always trying to optimize things. But you don’t want to do that in a way that is going to make your program big and unwieldy and complicated.

It turns out that a good principle is to push down all of the optimizations to the lowest level possible. You need to find the place in your code where things are simple and stupid.

I think it comes down to the fact that computers are really fast but also really stupid. And you need to respect both their speed and their stupidity. If you can manage to remember that, you’ll be ok.

Leave a Reply