Today I updated MinGW and rebuilt my current C++-project. I’ve logged timing-info since using 4.5.0 and I see a huge performance loss (about 4 times slower) when compiling with version 4.6.2.
My build-command:
g++ -Ilib\svl-1.5\include -Ilib\SDL-1.2.15\include -static-libgcc -static-libstdc++ \
-Ofast -O3 -oecl.exe src\ecl.cpp -lmingw32 -lSDLmain -lSDL -std=c++0x
I’m running MinGW on a Window 64 bit system.
Do you have any idea what causes that bad performance?
My bin-folder contains a file called mingw32-gcc-4.5.0. The MinGW 4.6 release notes page says that it can be used to compile with older versions. Unfortunately there is no such binary for g++. I read that gcc is also able to compile C++, but it doesn’t work in my case, I just get tons of errors. I only found the hint to use g++ on sites where people asked how to compile C++ programs using gcc.
Is there a way to get my C++ program compiled using mingw32-gcc-4.5.0? If not, is there another way to compile using version 4.5.0?
I want to ensure that the bad performance isn’t caused by changes in my code.
Edit
I managed to install 4.5.0 again by running my old MinGW-installer downloaded in 2010. I reverted my code and build-batch file to the state of yesterday. Still bad performance. Is MinGW installing DLLs or other related files outside of its installation directory?
Rebooting was the solution. It works again with both versions, 4.5.0 and 4.6.2. Now the binaray compiled with 4.6.2 performs even better.
The performance of my program has always been stable before updating MinGW, therefore I didn’t came to the idea that it was a problem with my system.
But that’s how our minds work: If two related things happen at the same time we think the first thing causes the second one. Illusionists are exploiting that fact 😛