Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.


Go Back   Vista Forums > Misc Newsgroups > .NET General

RB

Vista - clr and jit

Reply
 
06-04-2008   #1
Daniel


 
 

clr and jit

What is the difference in definition between clr and jit compiler? Does the
use of jit make .NET an interpreted language, or is it still a compiled
language, or both?

Daniel



My System SpecsSystem Spec
06-04-2008   #2
Michael Nemtsev [MVP]


 
 

Re: clr and jit

Hello Daniel,

Read there

http://en.wikipedia.org/wiki/Just-in-time_compilation
http://en.wikipedia.org/wiki/Common_Language_Runtime

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


D> What is the difference in definition between clr and jit compiler?
D> Does the use of jit make .NET an interpreted language, or is it still
D> a compiled language, or both?
D>
D> Daniel
D>


My System SpecsSystem Spec
06-05-2008   #3
Jon Skeet [C# MVP]


 
 

Re: clr and jit

Daniel <Mahonri@xxxxxx> wrote:
Quote:

> What is the difference in definition between clr and jit compiler?
The JIT compiler is just one small part of the CLR.
Quote:

> Does the use of jit make .NET an interpreted language, or is it still
> a compiled language, or both?
The code is never interpreted in .NET - always JIT compiled and then
executed natively (with support from the CLR, of course).

--
Jon Skeet - <skeet@xxxxxx>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
My System SpecsSystem Spec
07-06-2008   #4
Ben Voigt [C++ MVP]


 
 

Re: clr and jit



"Jon Skeet [C# MVP]" <skeet@xxxxxx> wrote in message
news:MPG.22b241bbc4f93330d41@xxxxxx
Quote:

> Daniel <Mahonri@xxxxxx> wrote:
Quote:

>> What is the difference in definition between clr and jit compiler?
>
> The JIT compiler is just one small part of the CLR.
>
Quote:

>> Does the use of jit make .NET an interpreted language, or is it still
>> a compiled language, or both?
>
> The code is never interpreted in .NET - always JIT compiled and then
> executed natively (with support from the CLR, of course).
Which occasionally is a performance-killing mistake.

For example, a type initializer. Is there ever an advantage to optimizing
the .cctor? Anything I can think of that could need optimization (anonymous
methods, expression trees, etc) has already been separated by the compiler
before any MSIL is generated.
Quote:

>
> --
> Jon Skeet - <skeet@xxxxxx>
> Web site: http://www.pobox.com/~skeet
> Blog: http://www.msmvps.com/jon.skeet
> C# in Depth: http://csharpindepth.com
My System SpecsSystem Spec
07-07-2008   #5
Andrei Varanovich [C# MVP]


 
 

Re: clr and jit

Hello Ben,
Quote:
Quote:

>> The code is never interpreted in .NET - always JIT compiled and then
>> executed natively (with support from the CLR, of course).
>>
> Which occasionally is a performance-killing mistake.
> For example, a type initializer. Is there ever an advantage to
> optimizing the .cctor? Anything I can think of that could need
> optimization (anonymous methods, expression trees, etc) has already
> been separated by the compiler before any MSIL is generated.
If you care about performance -- use NGEN utility from .NET SDK. It produces
native code from your assebmly instead of IL.

Thanks,
Andrei


My System SpecsSystem Spec
07-07-2008   #6
Jon Skeet [C# MVP]


 
 

Re: clr and jit

Ben Voigt [C++ MVP] <rbv@xxxxxx> wrote:
Quote:
Quote:
Quote:

> >> Does the use of jit make .NET an interpreted language, or is it still
> >> a compiled language, or both?
> >
> > The code is never interpreted in .NET - always JIT compiled and then
> > executed natively (with support from the CLR, of course).
>
> Which occasionally is a performance-killing mistake.
>
> For example, a type initializer. Is there ever an advantage to optimizing
> the .cctor? Anything I can think of that could need optimization (anonymous
> methods, expression trees, etc) has already been separated by the compiler
> before any MSIL is generated.
Likewise the initialization code for most forms is often executed only
once. I believe that Sun's HotSpot JIT will interpret code the first
time it runs, unless it spots significant loops. The benefit of the
"always JIT, and JIT exactly once" solution is that it's much simpler
than the kind of optimisation HotSpot performs. But yes, there can be a
price to pay.

--
Jon Skeet - <skeet@xxxxxx>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon_skeet
C# in Depth: http://csharpindepth.com
My System SpecsSystem Spec
Reply

RB


Thread Tools



Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd