PDA

View Full Version : A program compiled with minGW is slower than other compiled with MSVC?



tonnot
20th September 2010, 18:54
It is a total ignorance question.
MSVC and mingw produce a similar exe file? (regarding the speed of the program)
And (I have not try it ) ... is MSVC faster than QT+mingw when compiling ?
Thanks

tbscope
20th September 2010, 18:58
It is a total ignorance question.
This is not an ignorant question, at least to me.


MSVC and mingw produce a similar exe file?
No, they generate different code.


And (I have not try it ) ... is MSVC faster than QT+mingw when compiling ?
The speed of compiling? Or the speed of the compiled program?

Both can different from compiler to compiler.

tonnot
20th September 2010, 19:01
Thanks tbscope.
I ask for both questions the speed of the compiling and the speed of the compiled program.

ChrisW67
20th September 2010, 23:36
This is my anecdotal evidence... YMMV

On Windows I found that the MSVC compiler from the Windows SDK was slower than the MingW GCC in the Qt SDK building the same source (using the QMake default options). The MSVC compiler always seemed to produce smaller executables (presumably because it assumes the presence of more on the machine).

For my desktop application runtime performance differences were not noticeable. Unless you are doing some constant and mathematically intense calculation I doubt that the performance differences in generated code are likely to be significant.