Summary of the Approach to Code Tuning

You should take the following steps as you consider whether code tuning can help you improve the performance of a program:

  1. Develop the software by using well-designed code that's easy to understand and modify.

  2. If performance is poor,

    1. Save a working version of the code so that you can get back to the "last known good state."

    2. Measure the system to find hot spots.

    3. Determine whether the weak performance comes from inadequate design, data types, or algorithms and whether code tuning is appropriate. If code tuning isn't appropriate, go back to step 1.

    4. Tune the bottleneck identified in step (c).

    5. Measure each improvement one at a time.

    6. If an improvement doesn't improve the code, revert to the code saved in step (a). (Typically, ...

Get Code Complete, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.