[Mono-list] Intel and the CLR?

Ben Houston ben@exocortex.org
Tue, 5 Mar 2002 02:01:07 -0500


Hi Fergus,

> On 04-Mar-2002, Ben Houston <ben@exocortex.org> wrote:
> > Are we are talking about implementing the MSIL (microsoft
intermediate
> > language) into a chip instead of another version of assembly
language
> > (i.e. x86, 680x0, PowerPC, Java byte code, etc...).  This is a
horrible
> > idea in that it locks the constructs that can be used in MSIL byte
code
> > because one can not upgrade a chip as easily as one can upgrade
> > software.
> 
> Agreed.  But a Transmeta "Code Morphing" layer for the CLR would make
very
> good sense.

Could you define what the difference is between a full featured JIT
compiler (i.e. caching + optimizing + profiling) and Transmeta style
"code morphing"?  Is there much difference?  But maybe we should take
that offline (i.e. not on mono-list). :-)

> > I also do not see the point -- one compiles (ie. JIT
> > compilation) MSIL into x86 assembly (or any other processor assembly
> > language) anyways before running it anyways.  Thus the only benefit
is
> > that one does not have to JIT code before running it.  But even this
> > benefit is minimal considering that .NET currently caches the result
JIT
> > binaries between sessions.
>
> Are you sure?  Last time I looked, .NET did *not* automatically cache
the
> JIT binaries between different invocations of the same program.
> It would cache it between different invocations of a method, but it
was
> an in-memory cache that would only last as long as the process.
> 
> Please check your facts.

Sorry, you are correct -- I am wrong.  .NET will only cache JIT'ed
binaries if you generate them using the ngen.exe tool.  Otherwise it
only uses the in memory cache.  I guess this strategy makes sense since
otherwise your hard drive could be quickly filled with rarely used
preJIT'ed assemblies.  Although it could be easily improved to watch
which what assemblies are used often and add those to the
global/personal assembly cache (i.e. GAC) while at the same time
removing rarely used assemblies.

The GAC is located usually at "C:\WINNT\assembly" or equivalent...

Cheers,
-ben houston
http://www.exocortex.org