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:
Develop the software by using well-designed code that's easy to understand and modify.
If performance is poor,
Save a working version of the code so that you can get back to the "last known good state."
Measure the system to find hot spots.
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.
Tune the bottleneck identified in step (c).
Measure each improvement one at a time.
If an improvement doesn't improve the code, revert to the code saved in step (a). (Typically, ...
Get Code Complete, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.