Visual C ++ Compiler Optimization

I recently migrated from Dev-C ++ to Visual C ++ 2010 and found it much better in all aspects except one. When I compile and execute code in Dev-C ++ with the best-optimization option turned on, the compilation time is significantly reduced by almost half ( mingw32 ), but I cannot find any optimization options in Visual C ++ 2010 How can I tell the compiler to optimize the code ?

+2
c ++ optimization visual-studio-2010
Jan 13 2018-12-12T00:
source share
2 answers

Right-click your project, select Properties. Now make sure your current configuration is "Release". In the left part of the window you will see a tree with different categories. Optimization parameters are broken down into C / C ++ and linker entries.

Also, keep in mind that optimization means that the resulting binary is optimized. Actually does not build the binary. The speedup can be explained by the fact that you don’t need to add debugging code, etc., But in general, I most likely expect that creating a release version with optimizations will take more time than creating a debug assembly.

+4
Jan 13 '12 at 13:50
source share

I only have VS C ++ Express, but it should be the same in the full version ...

From the Project menu, select Properties. This will open a dialog with all the project settings. Check out the various options available and you will soon find where you can change the optimization.

Also remember that when creating in release mode, some optimizations are included.

0
Jan 13 2018-12-01T00:
source share



All Articles