Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When people talk about optimizing an application, there is a temptation to immediately think of recoding the hot routines in assembly language or of reaching for one of the many books about performance optimization that talk about loop unrolling, invariant hoisting, and so on.
These do not represent the best place to start. In general, it is best to avoid optimizations that make the code less easy to read. The best approach is to make minimal changes to the source code or to select improved compiler flags.