How much performance gain (if any) can a windows service gain between a debug build and release build and why?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For managed code, unless you have a lot of stuff conditionally compiled in for DEBUG builds there should be little difference – the IL should be pretty much the same. The Jitter generates differently when run under the debugger or not – the compilation to IL isn’t affected much.
There are some things the
/optimizedoes when compiling to IL, but they aren’t particularly aggressive. And some of those IL optimizations will probably be handled by the jitter optimizations, even if they aren’t optimized in the IL (like the removal of nops).See Eric Lippert’s article http://blogs.msdn.com/ericlippert/archive/2009/06/11/what-does-the-optimize-switch-do.aspx for details:
Read Eric’s article for information about
/optimizedoes do differently in IL generation.