### prajjwalsahu5432's blog

By prajjwalsahu5432, history, 3 weeks ago, ,

Hi everyone! Can any one give me detailed steps how to decrease compile time in Code-blocks IDE it takes much time to compile the code approx 4-5 seconds and a little bit more if i use <bits/stdc++.h> header file . I am a beginner in CP so can any of you guys give me detailed instruction on how to configure my IDE to decrease it's compile time.

I saw some other post too about how to decrease compile time but didn't get it.

• -16

 » 3 weeks ago, # |   0 Auto comment: topic has been updated by prajjwalsahu5432 (previous revision, new revision, compare).
 » 3 weeks ago, # |   +1 precompile the bits/stdc++.h header. That is, find it on your machine, and compile it with the same flags you use to compile .cpp files, but name it "stdc++.h.gch" https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html
•  » » 3 weeks ago, # ^ |   0 I found my stdc++.h file but ain't getting what to do next how to compile it and save it as .h.gch extension.If you could provide every step after finding the file detail wise it would be very helpful.Please help a brother out.
•  » » » 3 weeks ago, # ^ |   0 open your terminal and navigate to the directory where stdc++.h is located. Then compile it in the same way (the flags must be exactly the same to get the compile speed benefit) you compile .cpp files, but add the -o flag to name it:g++ [YOUR_FLAGS] -o "stdc++.h.gch" Now just include the line #include in your code, and it should compile quickly. I use debug flag and sanitizers, and my programs still compile in < 2 seconds (I don't use codeblocks, I compile from the terminal).
•  » » » » 3 weeks ago, # ^ |   0 I'll try.
•  » » » » 3 weeks ago, # ^ | ← Rev. 2 →   0 Do you have a better recommendation than code blocks that which is good and faster.
•  » » » » 3 weeks ago, # ^ |   0 I just did it.But i haven't find any significant change in compile time
 » 3 weeks ago, # |   +1 UltraSuperBest solution Don't use codeblocks.
•  » » 3 weeks ago, # ^ |   0 Then, what do you recommend?
•  » » » 3 weeks ago, # ^ |   0 CP-Editor is a pretty good one, better with the CP Companion extension
 » 3 weeks ago, # |   -10 UltraSuperBest^2 solutionSwitch to Python
•  » » 3 weeks ago, # ^ |   0 That would be the worst
 » 3 weeks ago, # | ← Rev. 3 →   0 Ultrasuperbest^(1e9+7)solutionUse vscode with coderunner extension . For being more faster, Use ubuntu operation system.
•  » » 3 weeks ago, # ^ |   0 Terrible advice.
 » 3 weeks ago, # |   -8 By changing your ide.