I wanted to know the optimum performance configuration I can obtain for a release build. I do not need any debugging info in a release build and if omitting it helps boost performance in a release build I am more than happy to abide by those changes. Kindly let me know if these setting are acceptable or if any of these settings should be changed for better performance.This is the configuration I have
Build Type : Release
Debug Information Format : Program Database (/Zi)
Preprocesors : Following are the preprocessors
WIN32 QT_LARGEFILE_SUPPORT QT_DLL QT_NO_DEBUG NDEBUG QT_CORE_LIB QT_GUI_LIB
Generate Debug Info : Yes (/Debug)
Optimization : Maximize Speed (/O2)
Whole Program Optimization : No
Overview of entire configuration
/I".\\GeneratedFiles" /I"." /I"C:\\Qt\\4.8.4\\include" /I".\\GeneratedFiles\\Release" /I"C:\\Qt\\4.8.4\\include\\QtCore" /I"C:\\Qt\\4.8.4\\include\\QtGui" /I"....\\External\\boost-win-1.47-32bit-vs2010\\include\\boost-1_47" /I"....\\External\\ta-lib-0.4.0-msvc\\ta-lib\\c\\include\\" /I"....\\External\\Qpid-32Bit\\Debug\\include\\" /I"..\\Common\\" /I"....\\External\\log4cplus-1.1.2-rc1\\include" /Zi /nologo /W1 /WX- /O2 /Oy- /D "WIN32" /D "QT_LARGEFILE_SUPPORT" /D "QT_DLL" /D "QT_NO_DEBUG" /D "NDEBUG" /D "QT_CORE_LIB" /D "QT_GUI_LIB" /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t- /Zc:forScope /Fp"Release\\WOPR.pch" /Fa"Release\\" /Fo"Release\\" /Fd"Release\\vc100.pdb" /Gd /analyze- /errorReport:queue
Should any of the above options be changed inorder to obtain maximum runtime performance. If I have omitted any options kindly let me know.
If you want to get the most optimized code from your compiler, you can try a profile guided optimization of your critical code. However, this kind of optimization is not as easy to achieve than simply tweaking to compiler options.
The achieve this, you will need to have a suite of tests that represents real-life scenarios. Instrument you code, run theses tests, and then:
I have never used this with Visual Studio (only Intel Compilers). VS2010 seems to have profile-guide optimization features .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.