“The Hacks of Life” is a blog from some developers at Laminar Research, which created the X-Plane franchise. Ben Supnik, the company's graphics lead, wrote an interesting and fairly lengthy blog post about optimizing for software performance, and it applies to more than just games.

In software development, the typical concept is: “write it, then profile it and fix what needs it”. This comes from the fear that developers will spend the majority of their time fixing the wrong problems. A profiler can tell you the chunks of code that hogs resources when you experience stutter, hitches, or hangs. They can also tell you how much of your overall performance is being used by specific parts of your application. These places have the most room for optimization, which allows you to budget more time for them. If you squeeze even a 100x performance increase out of code that runs for a tiny fraction of a millisecond per frame, then you spent all that time recovering at most a tiny fraction of a millisecond. All of that time could have been spent even doubling the performance of an 8ms effect, saving you 4 whole milliseconds per frame, which is the difference between 50 FPS and 60 FPS.

What I get from Ben's post is that, while not all of your code needs to run well, you cannot skip the design phase. The profiler can end up being an excuse to charge blindly into development. In a construction analogy, there is a difference between creating blueprints for your entire life, and building a house without any plans — but that's okay, we can cut holes in the drywall if we need more windows and doors.

It's an interesting post, and is the eventual result of mantras being taken too literally.