I am using an i7-7700HQ CPU @ 2.8GHz. However, after I installed visual studio code and set its C++ compiler from the visual studio community 2019, I got a very slow performance even running the simple program hello world.
It took me 1 minute to compile and 2 minutes to run the program. For instance, when I typed cl test.cpp, I have to wait 1 minute for it to finish compiling. Then I would type test.exe, another 2 minutes.
Here is my hello world program stored on the desktop.
#include <iostream>
void main()
{
std::cout << "Hello World!";
}
Then for a 60 line program, I will have to wait 4 minutes for it to compile and even longer to run. I find it very unusual, please let me know if there is any bug or problem in the program. Or if there are any solutions to this problem.
My process explorer image:

PE while running the program:
