views:

346

answers:

4

I have built an open-source application from the source code. Unfortunately, the original executable runs significantly faster. I tried to enable few compiler optimizations, but the result wasn't satisfactory enough. What else do I need to make in Visual Studio 2008 to increase the executable performance?

Thanks!

+1  A: 

Try to enable SSE instructions, when compiling. Also - you can try to compile using different compiler (GNU GCC). +There might be enabled some debug defines, shich also can reduce speed. +Check, that original .exe has same version as one you are trying to compile.

0xDEAD BEEF
If he is compiling for windows, he will need mingw. To use gcc, I guess he would need cygwin.
batbrat
+3  A: 

Define _SECURE_SCL=0. http://msdn.microsoft.com/en-us/library/aa985896(VS.80).aspx

Henrik
+1 That really slows STL containers
David Rodríguez - dribeas
A: 

The open-source precompiled binary is most likely (whit out know which project you are working with) compiled with GNU GCC (Mingw on Windows). That might be the reason that it is faster. According to question: performance g++ vs. VC++ some things are considerably slower if you use VC++.

Rickard von Essen
+2  A: 

Basically try enabling everything under Optimisation in project settings, then ensure Link Time Code Generation is on, enable Function-level linking and full COMDAT folding (that only reduces the size of the EXE but could help with caching), and turn off security features such as by defining _SECURE_SCL=0. Remember some of these settings have other implications, especially the security ones.

AshleysBrain