-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
The C++ Programmer's Mindset
By :
Profiling is the process of recording information about the execution of a program in order to understand its performance characteristics. This can be very crude, such as simply timing the time spent in particular functions or performing particular tasks. This is often the first step in identifying which parts of your program are the most computationally intensive and where you need to focus your performance tuning attention. Remember, you should only spend time optimizing components that need to be fast, and you should always measure (at least) twice before you jump in and make the cut. Performance tuning is time-consuming and difficult to get right, and should not be done at the expense of mission-critical components.
Once you’ve identified the parts of your program that actually consume the most amount of time (by measuring), you need to dig deeper to understand exactly what, if any, pieces of code aren’t maximizing their performance. Now, it...