Search results
Nov 7, 2011 · MinGW also compiles significantly slower than MSVC (though precompiled headers help a little). Despite all that, GCC/MinGW is an entirely reliable quality compiler, which in my opinion outperforms any to date available version of MSVC in terms of quality of generated code.
MSVC is fine if you are actually targeting Windows; MSVC is not nearly as bad as some here would have you believe. A fine reason to stick with GCC / Clang is if you really can't be bothered learning how to use Microsoft their tools.
MinGW because it's the closest to GCC and gives me a good indication of whether or not my code will compile cross-platform without having to wait for the build system. My code has to run on OSX, Linux and Windows. Visual C++ because it often has higher performance with math calculations than MinGW. It's often comparable to GCC on Linux though.
The default standard library (libstdc++) has better C++20 and C++23 support than Clang's (libc++) but not as good as Visual C++. Developing Windows applications with GCC (mingw-GCC) generally means shipping extra DLLs with your program, for the standard library.
This paper reports a performance-based comparison of six state-of-the-art C/C++ compilers: AOCC, Clang, G++, Intel C++ compiler, PGC++, and Zapcc. We measure two aspects of the compilers’ performance: The speed of compiled C/C++ code parallelized with OpenMP 4.x directives for multi-threading and vectorization.
MSVC is doing the compilation job significantly faster than MinGW-w64. The DLL sizes are comparable, if optimization is set to "-O2" for MinGW-w64, with "-O3" the DLLs from MinGW-w64 are larger. Binary files compiled with MinGW-w64 are performing significantly better than those compiled with MSVC.
People also ask
Is MinGW better than MSVC?
Is GCC better than MSVC?
Is GCC/MinGW a good compiler?
What is the difference between G++ and MSVC?
What is the difference between LLVM and MinGW?
Should I use GCC (MinGW) or MSYS2?
Aug 29, 2011 · First, MinGW is not a compiler, but an environment, it is bundled with gcc. If you think of using gcc to compile code and have it call the Windows API, it's okay as it's C; but for C++ DLLs generated by MSVC, you might have a harsh wake-up call.