Software performance is a very complex subject. There are a huge number of factors that will play a role in “how fast by software will be”.
Software developers must always keep the “performance” subject in mind, together with maintainability, extensibility and pace of development. On the other hand, it is very easy to become obsessed with performance. Trying to optimize performance too early is one of the most common mistakes. Even if you do need to optimize, another risk is to try to do some micro optimizations, like removing a few instructions in a tight loop, without really thinking about the big picture, or without knowing exactly where the problem lies.
“Performance” is also very vague by itself. Do we talk about speed of execution, memory consumption, disk space, … ? Depending on your program, the focus can be highly different.
I initially wanted to create a blog dedicated to this topic, but I decided that a category on this website would actually be a simpler addition. It will focus on how to analyze performance of your software, how to know where and when you should optimize, and some optimization techniques. The articles will not follow a fully logical path, but hopefully, they will be collated to create a structured how-to. The examples and data will be mostly about Java and C/C++.
We’ll start with some general insights on the optimization process, then with a series about object pooling and reuse, and memory allocation.