Donald Knuth’s famous pronouncement that “premature optimization is the root of all evil” should be etched in the mind of every professional software engineer. More bad code has been written in the misguided pursuit of efficiency than any other cause.
But that doesn’t mean that you can ignore efficiency. If your software is taking ten minutes to perform a task it should be performing in ten seconds, then you definitely have a problem.
As with any kind of bug, the key to solving a performance problem is identifying the root cause. And nine times out of ten, what that means is that you’re looking to find the bottleneck—the particular area of the code that is restricting overall performance.
In most ...