View Full Version : Performance options for VS.C++ Release Build
10-20-2004, 12:31 AM
If you use Visual C++ 2003 what switches do you use to compile your release build? Is there a "standard" set of switches to use or does the /O2 optimisation work for most?
10-20-2004, 05:01 AM
I set the optimization on in release build, and just use their default optimization. I don't know what combination of flags this entails, but it seems to optimize quite well. Unless you know something specific and detailed about how your program might benefit from manually choosing the optimization flags, I think your best bet is going with the default.
10-20-2004, 11:15 AM
Many years ago I read an article from someone at Microsoft who recommended "Optimize For Size" over "Optimize For Speed". This was in the bad old days, when everyone knew the Microsoft optimizer was crap. He claimed the optimizer produced unsafe and occasionally incorrect code, and it was bad mojo, and that NT itself was built with "Optimize For Size".
These days my understanding is that the VC++ optimizer is very very good. Maybe not the absolute drop-dead best (that'd probably be Intel's) but it's leagues better than it used to be. And leagues better than the Intel code generator for GCC. (I get all this from my brother, who works in the compiler group at Apple. He "owns" their inliner iirc.)
So what I do is turn on full-blown "optimize for speed", and if I ever get suspicious of the optimizer I ease it down to "optimize for size". Works great. Oh, and, I'm using MSVS 6, so I expect your optimizer is even better than what I'm using.
Of course, no optimizer is going to be as good as using a better algorithm, insert univerally accepted truths here, mom and apple pie, yadda yadda yadda.
Powered by vBulletin™ Version 4.1.3 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.