Ed
Sun Feb 22 17:57:13 CST 2004
Check out Ngen at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfnativeimagegeneratorngenexe.asp.
"Justin Galzic" <jgalzic@hotmail.com> wrote in message
news:2fd711c3.0402221536.9e58841@posting.google.com...
> Ed, thanks for answering to my post. If the underlying CIL is complied
> with JIT compiler only when the assembly is loaded, is it possible to
> do the JIT compilation of all of the functions that you'll use from a
> particular set of libraries ahead of time before the actual time
> you'll go to use them so everything is cached as native code right
> away?
>
> Justin
>
> "Ed Kaim [MSFT]" <edkaim@online.microsoft.com> wrote in message
news:<eODBroO#DHA.3848@TK2MSFTNGP10.phx.gbl>...
> > Beyond the memory loading and mapping, IL libaraies also have to be JIT
> > compiled (from IL to x86, for example) when loaded for the first time.
After
> > that, the cached native code is reused, which is much faster.
> >
> > "Justin Galzic" <jgalzic@hotmail.com> wrote in message
> > news:2fd711c3.0402211744.21a2edf5@posting.google.com...
> > > Could explain how the .net assemblies (Dlls) work when they are used
> > > by an exe -- I'd much appreciate it. If your exe is making a call to a
> > > function that's part of the .net framework library (ie
> > > System.Math.Ceiling), the amount of time taken up on the first call to
> > > the specific function is usually about 80-90% more than when the
> > > function is called again. Can someone explain to me why this works as
> > > it does? I know that when you use a Dll, it's got to get loaded into
> > > the system and map all of proc addresses for the functions into
> > > memory. On the first call, are these mapping of the function to a
> > > particular location in memory left blank and is the majority of time
> > > spent filling in these mappings?
> > >
> > > This brings up the question of whether there is a way to load the Dlls
> > > you're going to use for a certain EXE and set it up so everything is
> > > pre-cached? Is it possibly a setting for your project in Visual
> > > Studio.net?
> > >
> > > Apologies if this sounds vague but I'm not entirely familiar with this
> > > stuff just yet.
> > >
> > > Thanks,
> > > Justin