计算机专业毕业设计外文翻译----托管代码的优点
《计算机专业毕业设计外文翻译----托管代码的优点》由会员分享,可在线阅读,更多相关《计算机专业毕业设计外文翻译----托管代码的优点(7页珍藏版)》请在毕设资料网上搜索。
1、Advantages of Managed Code Microsoft intermediate language shares with Java byte code the idea that it is a low-level language with a simple syntax (based on numeric codes rather than text), which can be very quickly translated into native machine code. Having this well-defined universal syntax for
2、code has significant advantages. Platform independence First, it means that the same file containing byte code instructions can be placed on any platform; at runtime the final stage of compilation can then be easily accomplished so that the code will run on that particular platform. In other words,
3、by compiling to IL we obtain platform independence for .NET, in much the same way as compiling to Java byte code gives Java platform independence. You should note that the platform independence of .NET is only theoretical at present because, at the time of writing, a complete implementation of .NET
4、is only available for Windows. However, there is a partial implementation available (see for example the Mono project, an effort to create an open source implementation of .NET, at www.go- Performance improvement Although we previously made comparisons with Java, IL is actually a bit more ambitious
5、than Java byte code. IL is always Just-In-Time compiled (known as JIT compilation), whereas Java byte code was often interpreted. One of the disadvantages of Java was that, on execution, the process of translating from Java byte code to native executable resulted in a loss of performance (with the e
6、xception of more recent cases, where Java is JIT compiled on certain platforms). Instead of compiling the entire application in one go (which could lead to a slow start-up time), the JIT compiler simply compiles each portion of code as it is called (just-in-time). When code has been compiled once, t
7、he resultant native executable is stored until the application exits, so that it does not need to be recompiled the next time that portion of code is run. Microsoft argues that this process is more efficient than compiling the entire application code at the start, because of the likelihood that larg
8、e portions of any application code will not actually be executed in any given run. Using the JIT compiler, such code will never be compiled. This explains why we can expect that execution of managed IL code will be almost as fast as executing native machine code. What it doesnt explain is why Micros
9、oft expects that we will get a performance improvement. The reason given for this is that, since the final stage of compilation takes place at runtime, the JIT compiler will know exactly what processor type the program will run on. This means that it can optimize the final executable code to take ad
10、vantage of any features or particular machine code instructions offered by that particular processor. Traditional compilers will optimize the code, but they can only perform optimizations that are independent of the particular processor that the code will run on. This is because traditional compiler
11、s compile to native executable before the software is shipped. This means that the compiler doesnt know what type of processor the code will run on beyond basic generalities, such as that it will be an x86-compatible processor or an Alpha processor. Visual Studio 6, for example, optimizes for a gene
12、ric Pentium machine, so the code that it generates cannot take advantage of hardware features of Pentium III processors. On the other hand, the JIT compiler can do all the optimizations that Visual Studio 6 can, and in addition it will optimize for the particular processor the code is running on. La
13、nguage interoperability The use of IL not only enables platform independence; it also facilitates language interoperability. Simply put, you can compile to IL from one language, and this compiled code should then be interoperable with code that has been compiled to IL from another language. Youre pr
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中设计图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 计算机专业 毕业设计 外文 翻译 托管 代码 优点
