How to measure performance of Visual Studio compiler when compiling C++ project?
I am investigating slow compiles on an AMD 3955WX (ThreadRipper Pro) system compared to an AMD 5950X (Zen 3) system.
The way I test compile performance is I set Visual Studio to log compile time and I compile a 400K-line C++ project and compare the elapsed time. I cannot share the source code so no one can confirm my findings.
How to test compile speed of Visual Studio C++ compiler?
This is Windows, so I don't think compiling the Linux kernel is an option… or is it? I would like to get results in a minute or so… 30 minutes compile-time will suck.
Is there a open source project that people compile on Windows to evaluate compile times?
Is there a better way to test compile time performance?
Best Answer
The answer to this question is to use the vcperf tool as outlined here: https://devblogs.microsoft.com/cppblog/finding-build-bottlenecks-with-cpp-build-insights/
On the first step you only need to do 1 & 2. The rest of the article other than that seems to hit the key points.
And useful tip is to please make sure the /MP flag is enabled for the projects in question. FOR SOME REASON IT IS NOT ENABLED BY DEFAULT. This flag is used to enable Multi-Processing compilation.