Fast C++ compilers?

I use visual studio 2017 but I also want to use a more lightweight compiler. Any suggestions?
The compiler and build tools that come with visual studio are lightweight; it the the IDE that is heavy.

For a lightweight IDE (with much less features than the Visual Studio IDE, in particular one which has a retarded debugger for C++), try CodeBlocks.
http://www.codeblocks.org/

Though CodeBlocks ships with an obsolete version of the GNU compiler, the IDE can be configured to use other compilers.

MSYS2 https://www.msys2.org/ has more up to date C++ compilers ( GCC 7.3, clang 6.0); it would be a good idea to install these and hook up the CodeBlocks IDE to use one of these tool chains. (clang++ would probably give the fastest compile times)

Last edited on
Maybe something like Atom or Qt Creator? I heard good reviews. But I did not try
I should just learn to operate a compiler from the command line (Windows or linux) and cut out the code bloat that comes with all IDEs. Wouldn't you rather be in control?

Try out a load of editors and choose your favourite(s).

gcc is actually a compiler collection, so you can learn other languages at the same time. clang is also well-reputed. For what it's worth I get gcc from
http://mingw-w64.org/doku.php

There are also good online compilers (usually invoking one or more of gcc, clang and vc, as well as other languages) at
https://www.onlinegdb.com/
http://www.compileonline.com/
https://rextester.com/l/cpp_online_compiler_gcc
https://ideone.com/
https://coliru.stacked-crooked.com/
and, of course,
http://cpp.sh/
Last edited on
what do you want to do?

compile faster? This is tricky. Anything that takes long enough to compile that you need faster is probably too complex to trust to some offbeat compiler that may rush through it a tiny bit faster.

you can precompile working parts so changes go faster.
you can write a parallel make-build-something that compiles faster for a single huge program, if you need to, by compiling unrelated parts in parallel by spawning off.

I use Cygwin for my console programs/throw-away code stuff. Its light enough.
You can also set up console compiles and use notepad++ to edit small programs, and compile via visual studio. I think with a little hackery you can actually do single file compiles easily from within notepad++ by setting up the compiler as a plugin or a batch file to it or something. I haven't done that in a while, but dim memory says you can. I just have a fairly dumb compile.bat file with the usual g++ options and a couple of arguments for the input files.
Last edited on
what do you want to do?

Not right now.. but later on I might be in a coding competition. I want to use C++. So I want a lightweight IDE (thanks JLBorges for correcting me).. and might as well opt for a lightweight compiler I guess..

I need to be very fast because the competition is well, a competition ;)
Thx for suggestions still open for thoughts
I will say this: your IDE does not matter, because its just a text editor for working with what you type. Use what you like. And your compiler also does not matter, because the code competitions tend to compile the code you upload for you, using their own settings, not yours. If you can find out what their compiler is and what options they use with it, you can get that one and try to match them so you have the best possible comparison to your result and theirs. They probably use g++.


Topic archived. No new replies allowed.