The C++ Profiler is extremely useful for finding sections of code that require a high amount of processing time. Using the Profiler can help you find sections of code to focus on during optimization. If you suspect that a region of code runs slowly, then you can actually confirm that it isn't slow if it doesn't appear highlighted in the Profiler.
Go to Debug | Start Diagnostic Tools Without Debugging…
In the dialog shown in the preceding screenshot, select the type of analysis you'd like displayed. You can choose to analyze CPU Usage, GPU Usage, Memory Usage, or step through a Performance Wizard to assist you in selecting what you want to see.
Click on the Start button at the bottom of the dialog.
Stop the code after a brief time (less than a minute or two) to halt sample collection.
Inspect the results that appear in the
.diagsession
file. Be sure...