Typically, profiling is part of an iterative development process in which you make changes to improve efficiency in some application areas based on the latest performance results. The IDE supports this process by letting you easily compare the results of two Application Profiler sessions.
The comparison feature works for both profiling methods—that is, when sampling positions and counting calls or when measuring function runtimes. It's not recommended to compare sessions that used different methods because sampling-based estimates are less precise than function measurements.
Also, a comparison is meaningful only when you profiled the same application with the same workflow but different implementations, based on code changes you made to improve performance.
Full details about the numbers and icons shown in the comparison results are given in the Application Profiler reference. In summary, the Deep Time and Shallow Time values indicate the increase or decrease in execution time from the first (older) to the second (newer) session. In the program used to generate the results shown above, the shuffle() function calls mergeSort() during the first session but insertionSort() during the second session. This latter operation runs faster, as seen by the decrease in deep time for main() (i.e., the whole program) and the time for the insertion sorting function being less than that for merge sorting. Thus, performance has improved with the new sorting method.