VS 2005 C# Debug/Release

I get a Debug build (ends up in the Debug folder) whether I select Debug or
    Release.

I also wanted to turn on Optimization int the Release Build.
  (like C++ or is there no such option)
Does it matter in C#, if you select DEBUG or RELEASE
And is the distinction between the 2 sub-directories 'bin' and 'obj'.
It seems to build the same stuff in both with Obj have sub-directories for
    Refactor and TEmpPE( ) and includes a bunch of .resources files.

My program (a board game) run REALLY SLOWLY, and it is not just the Drawing.

I was thinking of porting to C++, asI did a comparison (E-Sieve) and
C++ is about 7x faster.

About MSIL:
Is it the case that all .NET programs are translate to IL.
If so, does it translate the whole program on Load or does it do it line by line
    as needed
I saw JIT mentioned, so I was thinking line by line, which would make it slow -
    if you executed a function 10 times, it would need to translate it 10 times.

Thanks

- John




Answer this question

VS 2005 C# Debug/Release

  • McBain

    Thanks for the reply.

    Do you know the difference between the BIN and OBJ directories

    In C#, what is changed when you build for Release
    The file seems to get about 5% smaller, but does not seem to run any faster.

    Are there any Optimization levels to set or switches as with CPP

    Thanks

    - John

  • Martin999

    Your options with C# through VS2005 are in the project properties (which I guess you found) including the dialog that pops up after clicking the advanced button.

    However, I think you are approaching it the wrong way. Don't try to find a magic setting that will make your code faster; instead identify the bottleneck and refactor your code to perform better. If you show us what you are doing, there may be suggestions to be made.

    Previous discussions/links on performance are here:
    http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework/search hl=en&group=microsoft.public.dotnet.framework.compactframework&q=performance+c%23&qt_g=1&searchnow=Search+this+group

    Cheers
    Daniel

  • RandyatTradewinds

    Thanks - I'll read the post.
    Not looking for a magic bullet, just wanted to make sure that there was no
       Optimization Level that may be set really low that I could change or
          other parameters that would help.'

    Thanks again

    - John

  • JohnnyWing

    By default, outputs of debug builds end up in the debug directory and of release builds in the release directory. Are you sure you haven't changed these defaults in the project properties If you are, post back with the repro steps.

    As for JITting: It is done once per method (unless the jitted code gets pitched following a full GC). For more see this:
    http://www.danielmoth.com/Blog/2004/12/jit.html

    Cheers
    Daniel

  • VS 2005 C# Debug/Release