3 ms·
llvm-mca (https://llvm.org/docs/CommandGuide/llvm-mca.html https://llvm.org/docs/CommandGuide/llvm-mca.html) is an invaluable tool for this, by the way. It has
by 10000truths 6y ago
llvm-mca (https://llvm.org/docs/CommandGuide/llvm-mca.html https://llvm.org/docs/CommandGuide/llvm-mca.html) is an invaluable tool for this, by the way. It has a steep learning curve if you're not familiar with modern CPUs' instruction scheduling/pipelining quirks, but if you really need to micro-optimize some hot spot in your code, it will expose to you all the necessary information to do so. In particular, the timeline view feature visualizes the execution state of a series of instructions quite nicely.