» 即时 (JIT) 编译

即时 (JIT) 编译

1990
Software engineer optimizing JIT compilation in a modern workspace.

Just-in-time (JIT) compilation is a hybrid approach that combines features of both compilation and interpretation. Instead of compiling code ahead-of-time (AOT), a JIT compiler translates bytecode into native machine code at runtime, just before it is executed. This allows for dynamic optimizations based on actual runtime behavior, often improving performance over pure interpretation.

A JIT compiler operates within a runtime environment or virtual machine. When a 方法 is called for the first time, its platform-independent bytecode is compiled into native machine code and cached. Subsequent calls to that method execute the fast, native code directly, bypassing the overhead of interpretation. This introduces a small startup or warm-up delay but can result in significant long-term performance gains for long-running applications.

The key advantage of JIT compilation is the ability to perform profile-guided or adaptive optimization. The runtime can monitor the code’s execution, gathering statistics on which code paths are ‘hot’ (frequently executed) and the types of data being processed. This runtime information, unavailable to a static AOT compiler, allows the JIT to make more informed optimization decisions. For example, it can perform speculative inlining of virtual method calls if it observes that a particular concrete type is always used. If this assumption later proves false, the JIT can perform ‘deoptimization’ and fall back to a safer execution path. This dynamic nature makes JIT compilation extremely effective for object-oriented and dynamic languages.

UNESCO Nomenclature: 1203
- 计算机科学

类型

软件/算法

中断

实质性

使用方法

广泛使用

前体

  • 提前(aot)编译器
  • 口译员
  • p 码和其他字节码系统
  • 研究 smalltalk 和 lisp 等动态语言
  • 虚拟机概念

应用

  • Java虚拟机(jvm)
  • .net 公共语言运行时(clr)
  • 网络浏览器中的 JavaScript 引擎(例如 v8)
  • pypy,一个高性能的python实现
  • 数据库查询执行引擎

专利:

NA

潜在的创新想法

级别需要会员

您必须是!!等级!!会员才能访问此内容。

立即加入

已经是会员? 在此登录
Related to: JIT, just-in-time compilation, dynamic compilation, virtual machine, jvm, clr, v8, bytecode, adaptive optimization, runtime.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

迎接新挑战
机械工程师、项目、工艺工程师或研发经理
有效的产品开发

可在短时间内接受新的挑战。
通过 LinkedIn 联系我
塑料金属电子集成、成本设计、GMP、人体工程学、中高容量设备和耗材、精益制造、受监管行业、CE 和 FDA、CAD、Solidworks、精益西格玛黑带、医疗 ISO 13485

我们正在寻找新的赞助商

 

您的公司或机构从事技术、科学或研究吗?
> 给我们发送消息 <

接收所有新文章
免费,无垃圾邮件,电子邮件不分发也不转售

或者您可以免费获得完整会员资格以访问所有受限制的内容>这里<

历史背景

(如果日期不详或不相关,例如 "流体力学",则对其显著出现的时间作了四舍五入的估计)。

相关发明、创新和技术原理

滚动至顶部

你可能还喜欢