3 ms·
Competently measuring performance is difficult. Stuff like the OS accumulating cruft over time can dominate trend lines. Broadly irrelevant reshuffles of progra
by JonChesterfield 3y ago
Competently measuring performance is difficult. Stuff like the OS accumulating cruft over time can dominate trend lines. Broadly irrelevant reshuffles of program layout can have noticeable impacts on cache behaviour.
I don't bother with competent performance measurement. That involves statistics and the like. Instead I run the thing through callgrind and use that as a proxy for reality, or play fewer-branches-better. That and wall clock time to warn me if I've walked off the edge of some quadratic algorithm.
In principle I'd like to measure performance carefully and reliably, but that probably involves running under an emulator hacked to tell you things about performance, or on bare metal as the only code executing on the chip. Both are difficult.