As we already described in Chapter 1, Understanding Performant Programs, performance bottlenecks are not distributed evenly in code. Applying the Pareto principle to performance optimization, we could say that 80% of a program's execution time is spent on 20% of the code (and, as we've seen, Donald Knuth believed this to be an even lower figure). Regardless of the exact proportions, the basic insight is the same—code optimization efforts are most effectively spent on that critical x percent of the code that is responsible for most of the program's execution time.
We saw in the previous chapter that today's hardware platforms have grown to be so complicated that the ancient adage about programmers being notoriously bad at estimating bottlenecks in their own code has now been reinforced more than ever—not only do we...