MinGW uses G++ 3.x, which is very very old. It's a limitation of the compiler itself -- old versions of G++ are simply slow. There are some "unofficial" G++ ports to windows that borrow from the MinGW project that use more recent (4.x) versions of G++, and it's possible your Code::Blocks IDE was using one of those.
I seriously doubt that the second and a half is significant in 99.9% of usages of most compilers anyway. Even if it is overhead imposed by the IDE itself, we're talking about what is essentially a one time cost -- it shouldn't blow up to insane compile times when you compile larger programs.
In response to FredOverflow's comment: From the MinGW installer (mingw.ini):
[mingw]
Build=12
URL=http://prdownloads.sourceforge.net/mingw
Filename=MinGW-5.1.6.exe
packages=previous|current|candidate
[current]
runtime=mingwrt-3.17-mingw32-dev.tar.gz|7300
runtimeDLL=mingwrt-3.17-mingw32-dll.tar.gz|30
w32api=w32api-3.14-mingw32-dev.tar.gz|14460
binutils=binutils-2.20-1-mingw32-bin.tar.gz|26979
core=gcc-core-3.4.5-20060117-3.tar.gz|7712
gpp=gcc-g++-3.4.5-20060117-3.tar.gz|15480
g77=gcc-g77-3.4.5-20060117-3.tar.gz|5272
ada=gcc-ada-3.4.5-20060117-3.tar.gz|33860
java=gcc-java-3.4.5-20060117-3.tar.gz|43160
objc=gcc-objc-3.4.5-20060117-3.tar.gz|3720
make=make-3.81-20090914-mingw32-bin.tar.gz|723
[previous]
runtime=mingwrt-3.15.2-mingw32-dev.tar.gz|7616
runtimeDLL=mingwrt-3.15.2-mingw32-dll.tar.gz|40
w32api=w32api-3.13-mingw32-dev.tar.gz|14420
binutils=binutils-2.19.1-mingw32-bin.tar.gz|21093
core=gcc-core-3.4.2-20040916-1.tar.gz|8627
gpp=gcc-g++-3.4.2-20040916-1.tar.gz|16542
g77=gcc-g77-3.4.2-20040916-1.tar.gz|5158
ada=gcc-ada-3.4.2-20040916-1.tar.gz|33333
java=gcc-java-3.4.2-20040916-1.tar.gz|45547
objc=gcc-objc-3.4.2-20040916-1.tar.gz|4555
make=mingw32-make-3.81-20080326-2.tar.gz|727
[candidate]
binutils=binutils-2.18.50-20080109-2.tar.gz|20505
core=gcc-core-3.4.5-20060117-3.tar.gz|7712
gpp=gcc-g++-3.4.5-20060117-3.tar.gz|15480
g77=gcc-g77-3.4.5-20060117-3.tar.gz|5272
ada=gcc-ada-3.4.5-20060117-3.tar.gz|33860
java=gcc-java-3.4.5-20060117-3.tar.gz|43160
objc=gcc-objc-3.4.5-20060117-3.tar.gz|3720
make=mingw32-make-3.81-2.tar.gz|720