25.6. Summary of the Approach to Code Tuning

 < Free Open Study > 

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, more than half the attempted tunings will produce only a negligible improvement in performance or degrade performance.)

  3. Repeat from step 2.

 < Free Open Study > 


Code Complete
Code Complete: A Practical Handbook of Software Construction, Second Edition
ISBN: 0735619670
EAN: 2147483647
Year: 2003
Pages: 334

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net