Maybe because it is too slow compiling with optimizations on. But you should fix that compiling with optimizations off when testing and with optimizations on to distribute the final product.
It seems that on Linux it works much faster, so consider your development platform, since MingW is a port. But i'm not a compiler guru
and this is not too related to codeblocks so try searching on google for this kind of questions.
The only compiler I use is gcc it adheres to the C/C++ standards really well, better than propietary compilers.