In VS I was actually under debug mode. However, I did the same in Code::Blocks by generating debug information and putting a breakpoint (just to make sure .
I was just thinking, maybe you should try compiling both in Release mode, as then both compilers will try to optimize, instead of compiling both in Debug mode, and hoping that MinGW will be less efficient.
Jonathan