JIT Compilation

for RuBoard

Traditional software environments have generally fallen into one of two categories: precompiled and interpreted. Precompiled environments are used by C/C++, Visual Basic, and Fortran. Source code is read in by a compiler, which then emits machine language code into a library or executable. Interpreted environments are used by Perl, Python, ASP (in IIS), and ECMA Script. Script files are text files that are treated as a set of instructions by a program (the scripting engine).

The .NET Framework has some elements of both precompiled and interpreted environments. .NET assemblies are compiled from source languages, but as mentioned earlier, they are compiled into IL instead of machine language. The IL, unlike scripting languages, is not sent to an interpreter. Also, since it isn't a machine language, it cannot be directly executed. Instead, the IL is sent to a JIT compiler. The JIT compiles each method as it is about to be executed. Unexecuted methods are never compiled.

JITted code generally runs faster than interpreted code because once it turns into machine language, it can directly execute. Interpreted languages have to convert the same source code into low-level instructions every time it executes. Note that the performance enhancements for small, short-running processes will not be very great. However, for longer-running applications such as ASP.NET applications, the speedup from JITted code can be significant.

JITted code has some benefits over precompiled code, too. First, IL is the same everywhere. Thus, the same assembly that runs on Windows should (at least in theory) run on UNIX or MacOS, as long as the common language runtime exists on each platform. Second, even if the same assembly is always run on Windows, a JIT compiler can take advantage of optimizations from different processors. A precompiled file cannot easily optimize for every different processor. However, because it takes time to start up the .NET Framework before code is compiled by the JIT, a precompiled application will start up faster than a JITted one.

for RuBoard


. NET Framework Security
.NET Framework Security
ISBN: 067232184X
EAN: 2147483647
Year: 2000
Pages: 235

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net