Search results
SJLJ (setjmp/longjmp): – available for 32 bit and 64 bit – not “zero-cost”: even if an exception isn’t thrown, it incurs a minor performance penalty (~15% in exception heavy code) – allows exceptions to traverse through e.g. windows callbacks.
Apr 22, 2016 · 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.
SJLJ, DWARF and SEH are three different ways to implement C++ exception handling. As far as I'm aware 64-bit versions of g++ only use a scheme based on SEH, Windows' own low level exception handling, so the differences are mainly of historic interest.
We have the MinGW-W64 that is a fork of MinGW that supports those features and I was wondering, which one to use? Knowing that GCC is one of the most used C++ compilers. Or it's better to use the MSVC (VC++) on Windows and GCC on Linux and use CMake to handle with the independent compiler?
Some software only supports MSVC on Windows (e.g. CPython, including native modules) so you may have to use it. The only advantage is that you get a statically-linked CRT — versus linking against an old msvcrt.dll per Mingw-w64 — though historically Microsoft's UCRT has been kind of buggy, and those bugs then get baked into your binaries.
The exception models aren't a problem per se, just that support and implementation seem to vary, especially between mingw and mingw-w64. SEH seems to be the only zero-overhead model, while DW2 doesn't seem to exist on x64.
People also ask
Is MinGW-w64 Seh better than MSVC 2010?
Is MinGW faster than MSVCRT?
What is the difference between MinGW and MSVC?
Is OCCT better than MinGW-w64?
Should I use Seh build if I use MinGW?
Should I use GCC (MinGW) or MSYS2?
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.