473,832 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compilar options or ngen.exe?

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!!
Jul 21 '05 #1
5 1462
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

"Ramon Guerrero" <ob************ @hotmail.com> wrote in message
news:07******** *************** *****@phx.gbl.. .
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!!

Jul 21 '05 #2
-----Original Message-----
Hi Ramon,

I don't think that Gx options have any effect on managed code (I assume youare 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 developmentmiha at rthand com
www.rthand.com

"Ramon Guerrero" <ob************ @hotmail.com> wrote in messagenews:07******* *************** ******@phx.gbl. ..
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!!

.

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.
Jul 21 '05 #3
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.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com
Jul 21 '05 #4
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.

"Ramon Guerrero" <ob************ @hotmail.com> wrote in message
news:06******** *************** *****@phx.gbl.. .
-----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

"Ramon Guerrero" <ob************ @hotmail.com> wrote in

message
news:07******* *************** ******@phx.gbl. ..
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!!

.

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.

Jul 21 '05 #5
-----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 MSILcode that get's optimized by the JIT compiler.

Willy.

"Ramon Guerrero" <ob************ @hotmail.com> wrote in messagenews:06******* *************** ******@phx.gbl. ..
>-----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
>
>"Ramon Guerrero" <ob************ @hotmail.com> wrote in

message
>news:07******* *************** ******@phx.gbl. ..
>> 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!!
>
>
>.
>

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.

.

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
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8265
by: William Reyes | last post by:
I have a question regarding the use of ngen.exe and dedployment. I want to make sure I understand this correctly. If I create an app that has an .exe as well as a couple of .dll's. I can create a setup package, create a batch file (specifying the ngen commands) run the install, call the batch file from within the setup program and run ngen.exe on the .exe and .dll files. This will create a native image in the machines GAC.
2
2737
by: Wol | last post by:
I have two assemblies, A.dll and B.dll. A.dll contains two methods. One method, UsesB, uses a type from B.dll whereas the other, DoesNotUseB, does not. To cache a native image of A.dll with both methods precompiled, I believe I can do ngen A.dll B.dll
2
2209
by: JMMB | last post by:
Just a confirmation. NGen generates native code when i install the windows application on the client or when I run it for the first time? thanks,
1
2337
by: fleimeris | last post by:
hello, i am preparing for 70-316 exam and i'm not quite sure about the answer to the following question. i want to use ngen.exe to boost the performance of my application. however, when should i precompile it? a) before installing the application on the client computer or b) after installing the application on the client computer? thanks
3
1111
by: Dinesh Jain | last post by:
Hi All, When we give a .NET exe to client, what comlier options we should change to give it as a Release Build? I know about setting the output as release build (Configuration Manager) but confused about enabling JIT option. It is necessery to turn it on? Please help, Thanks in advance,
5
248
by: Ramon Guerrero | last post by:
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!!
1
2048
by: Sameeksha | last post by:
Hi everyone, I have observed that the ngen process appears in the list of processes in taskmgr while .net framework 1.1 gets installed. This process consumes 0-50% of cpu and 0-20K of RAM. I would like to know if this process can be a cause of slowing down performance of a high speed application. The installer of this application
2
4805
by: whezker | last post by:
Hi everybody. I'm trying to use the ngen tool from framework 2.0, to accelerate the load runtime of my app. I'll explain here what I'm doing. First I copy&paste the ngen.exe to the Bin folder of my project (to not have to especify the path), where is the .exe of my app. Then, in the CMD, i go to the same folder to execute the ngen, and I've tried differents ways to create the native image. One way was create the aimages of the .exe...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10212
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9319
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7753
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5623
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5789
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4421
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.