Typically, profiling is part of an iterative development process in which you improve efficiency in some application areas based on the latest profiling results. The IDE supports this process by letting you easily compare the results of two profiling 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 profile the same application with the same workflow but different implementations, or you take snapshots of an application at different points in time.