2010
02.23

Compiler race

I thought I would have a quick look at how good a few different C++ compilers were at optimising my code and it turns out Microsoft are better than I gave them credit for. I compiled the same VST plugin using as many optimisations as possible and monitored the CPU usage in Plogue Bidule. I then averaged the number of cycles used of ten measurements in Christian Budde’s VST analyzer.

MinGW using G++ 3.4 = 11.53% (77517 cycles)
MINGW using G++ 4.40 = 11.90% (79222 cycles)
Visual C++ 2008 Express = 6.65% (38521 cycles)

Admittedly it’s nothing too scientific but Microsoft certainly know what they are doing with compilers, its just a shame that that the Visual Studio IDE is getting slower with each version. I was surprised how slow G++ was in Windows in comparison and also that there was no performance gain going from version 3.4 to 4.4 However, G++ has the big advantage that it’s also cross-platform so although the code itself may be slightly slower, using G++ makes it a lot faster to get the code up and running on Windows, Linux and OSX.

1 comment so far

Add Your Comment
  1. I report the same results. Gcc for mac osx is veery slow.
    giancarlo, acustica