|
|
|
|
|
by shepmaster
997 days ago
|
|
A solution is mentioned in the article, but perhaps obliquely: > while I also wanted to measure hardware counters As I understand it, hardware counters would remain consistent in the face of the normal noisy CI runner. The article talks about using Cachegrind (via the iai crate) and Linux perf events. I use iai in one of my projects to run performance diffs for each commit. |
|
With cloud CI runners you'd still have issues with hardware differences, e.g. different CPUs counting slightly differently. even memcpy behavior is hardware-dependent! And if you're measuring multi-threaded programs then concurrent algorithms may be sensitive to timing. Also microcode updates for the latest CPU vulnerabilities. And that's just instruction counts. Other metrics such as cycle counts, cache misses or wall-time are far more sensitive.
To make sure we're not slowly accumulating <1% regressions hidden in the noise and to be able to attribute regressions to a specific commit we need really low noise levels.
So for reliable, comparable benchmarks dedicated is needed.