From: Óscar F. <of...@wa...> - 2013-06-09 22:18:17
|
On a CPU-intensive C++ application, I found a 3x slowdown on executables compiled with MinGW compared with Visual Studio. It is not the core compiler, because the same g++ version on Linux does a job as good as VS, if not better. It is not exception handling code either, because disabling exceptions makes just a bit of a difference. Finally, I also discarded memory handling as a cause. There is no multithreading nor any OS-intensive work. The C++ application is a JIT compiler. The compilation part is slower than VC by a 1.1 factor. That is acceptable. But while executing the generated bytecode the slowdown factor is larger than 3. The compiler creates an array of funcion pointers and the interpreter just walks the array calling those functions. Each function does a fairly simple job (like "take 2 numbers from the stack, add them and put the result on the stack".) The obvious suspect is some Windows-specific compiler intrinsic that could be implemented on a suboptimal way. Which areas are known to be performance sinks? |