Minimize External Factors
It’s obvious that before measuring performance you need to free up memory, ensure that nothing else runs in parallel, and that no disk I/O happens. But there are a few things you might want to do beyond that.
Disable Dynamic CPU Frequency Scaling
The first thing to consider is disabling dynamic CPU frequency scaling, not because scaling makes your program run slower, but because two separate program runs may be incomparable because they’re executed with the CPU capped at different frequencies. That’s why it’s a good idea to disable CPU frequency scaling if you can.
On Linux, the governor defines the current CPU frequency. By default the ondemand governor is used, meaning that CPU speed will change dynamically depending ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access