第2部分高级软件工程主题开发模式与平台资料.ppt

第2部分高级软件工程主题开发模式与平台资料.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Matrici We already know that an assembly does NOT contain native binary code, but instead MSIL code. Obviously before the MSIL code can be executed it must be converted into native binary instructions. Converted? Does this mean interpreted? NO! The MSIL code is compiled and not thrown away. This means that next time the code is requested it is already in the form of machine instructions and thus this mechanism in the log run is far more efficient than an interpreter for example. The compilation is carried out by a JIT Just In Time compiler. Does the compiler compile all of the code in one go? The answer to this question is NO. If this approach was taken there would be a long delay during the applications initialisation, and realistically not all the code within the module will be required in one go. Instead, when the code is loaded a ‘stub’ is connected to each method. When a method is called via the stub the compiler generates the binary native code. This mechanism goes a long way to describing why the compiler is called a ‘JIT’ compiler. Microsoft intends to ship two JIT compilers, the normal compiler and the so called ‘Economy’ compiler. The normal JIT compiler will be installed on to most platforms. The normal JIT compiler is an optimised compiler which takes time out to examine the MSIL code in order to generate the most efficient binary code. On platforms such as Windows CE machine where processing power is more limited it is thought that the somewhat less intelligent Economy compiler will be installed. The Economy compiler simply subsitutes the MSIL code with the equivilant binary code. Obviously the Economy compiler will actually compile code much more quickly but the resultant code will not be optimised and will therefore execute more slowly. The benefits for to this system is obviously portability. So, what are the cons? Performance. Obviously managed code is never going to outstrip native binary code! Or is it that simple? A cou

文档评论(0)

a1166671 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档