Summing Up
Performance optimization can only be performed starting with a well-crafted and maintainable object-oriented program. Given that, you should perform careful timings to make sure you've isolated the actual source of the performance problem. Once you have a target, C++ offers some language features that may help.
Once you have made changes, you need to rerun your tests to determine whether they have had any effect.
However, keep in mind that many performance problems result from problems with your program logic or from overhead accessing files or databases. There are numerous texts on algorithms that discuss the relative speeds of alternate approaches to specific programming challenges and you should make sure to consult those as well ...
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