title: How to reliably measure performance of a C++ application on laptops
body: <p>I have to optimize a C++ application and because of COVID-19 pandemic I'm forced to work from home on a MacBook Pro. When measuring performance the results vary even by 3x, depending on the CPU temperature. For example a function that usually takes between <code>23500000ns</code> and <code>24500000ns</code> ran in less than <code>13500000ns</code> after lunch break and the same function takes more than <code>37500000ns</code> after recompiling a big chunk of code.</p>
  
  <p>My questions is - how to reliably measure performance on laptops considering the huge CPU performance variance due to temperature? </p>