This week has been a massive pain in the ass. For those of you aspiring to be software developers, there's one aspect of it that isn't taught in school nearly well enough, and is something that is the driving force behind every release. Performance. Once the core aspects of a product are completed, performance becomes the most important thing you will focus on ad nauseum. Every new feature that gets added should either not hurt performance or improve it. And it is here that the ideals of academia get thrown out the window. There is the theoretical way to code something, and then there is the performance driven way to code something. Just wait until you see some of the crazy things that get added for the sake of gaining 1%...

Everything starts off at the theoretical ideal. Then performance regresses, with a week left before Project Managers start freaking out because we're behind schedule, and you're stuck doing run after run after run, tweaking something here, commenting out something there, build after build. Performance regression defects are the bane of my existence. Give me the core dump of a crashed process any day - at least there's a reason it crashed; after going through the stack, and the memory regions, and the assembly code, you will eventually determine why it crashed. With performance there is no standard approach besides obtaining profiles and trying to make some sense out of the data it provides. To add to that, you have to run the thing multiple times in order to get any kind of confidence that what you're measuring is the stable value and not just random fluctuations. You also have to try and normalize the machine you're running on to the best of your ability. This means pinning processes to CPUs, having multiple machines, adding physical network links between machines, etc.

It is a black art that I have not come even remotely close to mastering. And it is a giant pain in the ass. But as much as I hate it, I understand that it is absolutely necessary. If there are two competing products that do the same work, wouldn't you want the one that performs better?