Hi brilliant people! Hope you All are doing great.... I have a question: My computer takes so much time to compile and run even a simple "hello world" program. In average it varies from 15 sec to 1 min. I just want to know what is happening under he hood. Is there any of you faced the same problem as me? And how did you solve that ? I would be very grateful if you guys help me find out the problem . Thanks in advance lovely people .
Are you using-
#include <bits/stdc++.h>
, if so, you might wanna either use precompiled headers or just use the includes for the required things.guide for precompiled headers
It would help to know which OS, compiler, and environment you are using.
Try Precompiled Header Files
#include "bits/stdc++.h"
If you're using some antivirus try to switch it off and then check whether it improves.
Wow. That's a good point man. My mcafee always detects..cpp as a virus. Let me try. Thanks a lot
This. Windows is very slow when it comes to reading many files, because every single suspicious file you read or write is checked by the anti-virus, synchronously. That's terrible architecture, but we have to deal with that. Many programmers I know just disable the anti-malware software for their source code directories and compiler directories.
do you use gcc or clang?