C#及时意义 [英] c# just in time meaning

查看:69
本文介绍了C#及时意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C#编译器定义中的即时含义是什么?

what does Just-In-Time mean in C# compiler definition?

推荐答案

JIT编译器在启动后运行将代码(通常是字节码或某种VM指令)即时(或称为即时)编译为通常更快的形式,通常是主机CPU的本机指令放. JIT可以访问动态运行时信息,而标准编译器则不能,并且可以进行更好的优化,例如内联经常使用的函数.

这与传统的编译器相反,传统的编译器在程序首次运行之前将所有代码编译为机器语言.

换个说法,传统的编译器会在您第一次运行该程序之前将整个程序构建为EXE文件.对于较新样式的程序,将使用伪代码(p代码)生成程序集.只有在OS上执行程序之后(例如,通过双击其图标),(JIT)编译器才会启动,并生成基于Intel的处理器或其他任何可以理解的机器代码(m代码).
A JIT compiler runs after the program has started and compiles the code (usually bytecode or some kind of VM instructions) on the fly (or just-in-time, as it''s called) into a form that''s usually faster, typically the host CPU''s native instruction set. A JIT has access to dynamic runtime information whereas a standard compiler doesn''t and can make better optimizations like inlining functions that are used frequently.

This is in contrast to a traditional compiler that compiles all the code to machine language before the program is first run.

To paraphrase, conventional compilers build the whole program as an EXE file BEFORE the first time you run it. For newer style programs, an assembly is generated with pseudocode (p-code). Only AFTER you execute the program on the OS (e.g., by double-clicking on its icon) will the (JIT) compiler kick in and generate machine code (m-code) that the Intel-based processor or whatever will understand.


在这里,您对JIT有很好的解释

http://en.wikipedia.org/wiki/Just-in-time_compilation [ ^ ]
Here you have a nice explication of JIT

http://en.wikipedia.org/wiki/Just-in-time_compilation[^]


这篇关于C#及时意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆