|
|
|
|
|
by Shish2k
1535 days ago
|
|
> Counting instructions is very accurate and roughly approximates power usage I’ve always assumed this to be true, but I see a lot of benchmarking tools / libraries measuring wall-clock time or iterations-per-second or something like that, I’ve never seen a benchmark tool which counts CPU instructions. Am I being blind or is there some other reason that I’m not seeing them? :S |
|
Instruction counting is more of a specialized tool but I like to use it whenever I can because it has low variance and makes comparing changes a lot easier. Compare how bumpy these graphs are for instruction count (first link) and wall clock time (second link):
https://perf.rust-lang.org/
https://perf.rust-lang.org/?start=&end=&kind=raw&stat=wall-t...