About performance
As I stated in the opening statement of this book—performance matters. But what exactly is performance? What do we mean when we use this word? Sometimes, we just want to say that the program runs so fast that the users don’t detect any delays. We can say that the program is not lagging and that the user interface does not block. In other situations, performance means that a program finishes its execution quickly, or that a server can handle a large number of clients.
Knowing what we mean when we use the word will help us determine the best way to fix the problem. Whatever the approach will be, we still have to find out why the application is not performing as we expect. The first suspect should always be the algorithm, and to examine it, we need to know more about how algorithms behave.
Algorithms are all different. What we want to know about them when we are designing a program is how they behave when their input set gets larger and larger. Some...