Compilar options or ngen.exe?

  • Thread starter Thread starter Ramon Guerrero
  • Start date Start date
R

Ramon Guerrero

One thing that bugs me is whether to use the ngen tool or
to compile the code to run under certain processors,
using the compiler options G5, G6, ect...? Say i
deployed an app to a user running a pentium 4 on his
computer. I know that the ngen tool is used for start
up, but which would cause the app to start up faster,
ngen or the compilar options? Thanks!!
 
Hi Ramon,

I don't think that Gx options have any effect on managed code (I assume you
are talking about managed code) since it is compiled always to MSIL.
Thus NGEN on target machine is the only way to speed up managed code.
 
-----Original Message-----
Hi Ramon,

I don't think that Gx options have any effect on managed code (I assume you
are talking about managed code) since it is compiled always to MSIL.
Thus NGEN on target machine is the only way to speed up managed code.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com




.
Are you sure the Gx options have nothing to do with
managed code, because the default compilation option is
O2 (or O3 i can't rem). With that option set, it
combines many of the other options into one, which is the
default release build. You could either use this default
or custom make your own.
 
Are you sure the Gx options have nothing to do with
managed code, because the default compilation option is
O2 (or O3 i can't rem). With that option set, it
combines many of the other options into one, which is the
default release build. You could either use this default
or custom make your own.

I am pretty sure that there is no point optimizing MSIL for a processor (I
don't have much experience with C++ optimitzations though) as this is the
work for ngen or jit.
However, you might try different optimizing options and see if they make a
difference in msil.
 
The compiler options you are talking about is for VC++ native mode only,
managed code compilers have no such optimization flags as they produce MSIL
code that get's optimized by the JIT compiler.

Willy.
 
-----Original Message-----
The compiler options you are talking about is for VC++ native mode only,
managed code compilers have no such optimization flags as they produce MSIL
code that get's optimized by the JIT compiler.

Willy.




.
Ok i understand. I thought the options affected managed
code too. Yeah I am a straight VC++ freak, sorry for not
mentioning that. I figured the options for VC++ were the
same with C# because of the managed extension tacked on
to VC++. I thought those were .NET features. Thanks a
lot for your help Miha and Willy!! Ramon
 
Back
Top