Intel® C++ Compiler 16.0 User and Reference Guide
You should measure performance to find and understand bottlenecks. Even small changes in a program can lead to large and sometimes surprising performance differences. The only reliable way to tune performance is to measure frequently—preferably on a mix of different systems. Use any tool or technique at your disposal, but only true measurements will determine if your optimizations are effective.
Performance measurements can be misleading, however, so it is important to take a few precautions and be aware of potential performance anomalies. Most of these precautions are straightforward but may be overlooked in practice.
Other running applications can affect performance measurements. Even an idle version of a common desktop application can consume processor time and distort measurements.
If you are measuring time between points in the program, be careful not to measure elapsed time between two points if other strands could be running in parallel with the function containing the starting point.
Dynamic frequency scaling on multicore laptops and other systems can produce unexpected results, especially when you increase worker count to use additional cores. As you add workers and activate cores, the system may adjust clock rates to reduce power consumption and therefore reduce overall performance.