Optimization Techniques
We’ve avoided this for long enough; now it’s time to look at the really gory details. Having followed the optimization procedure outlined above, you’ve proved that your program performs badly and have found the worst code culprit. Now you need to whip it into shape. What can you do?
There’s a palette of optimizations to choose from. Which is the most appropriate will depend on the exact cause of the problem, what you’re trying to achieve (e.g., increased execution speed or reduced code size), and how much of an improvement is required.
These optimizations fall into two broad categories: design changes and code changes. A change at the design level will usually have a more profound effect on performance than a code-level tweak. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access