What are the differences between a Just-in-Time-Compiler and an Interpreter?(即时编译器和解释器有什么区别?)
问题描述
Just-in-Time-Compiler 和 Interpreter 有什么区别,.NET 和 Java JIT 编译器有什么区别?
What are the differences between a Just-in-Time-Compiler and an Interpreter, and are there differences between the .NET and the Java JIT compiler?
推荐答案
Just-in-时间编译是在执行之前将非本地代码(例如字节码)转换为本地代码.
Just-in-time compilation is the conversion of non-native code, for example bytecode, into native code just before it is executed.
来自维基百科:
JIT 建立在运行时环境中的两个早期想法之上:字节码编译和动态编译.它在本机执行之前在运行时转换代码,例如将字节码转换为本机机器码.
JIT builds upon two earlier ideas in run-time environments: bytecode compilation and dynamic compilation. It converts code at runtime prior to executing it natively, for example bytecode into native machine code.
interpreter 执行程序.它可能有也可能没有抖动.
An interpreter executes a program. It may or may not have a jitter.
再次,来自维基百科:
解释器可能是一个程序要么
An interpreter may be a program that either
- 直接执行源代码
- 将源代码翻译成一些有效的中间表示(代码)并立即执行
- 显式执行由编译器生成的存储的预编译代码这是解释器的一部分系统
标准的 Java 和 .NET 发行版都具有 JIT 编译,但标准并不要求它..NET 和 C# 中的 JIT 编译器当然不同,因为中间字节码不同.原理是一样的.
Both the standard Java and .NET distributions have JIT compilation, but it is not required by the standards. The JIT compiler in .NET and C# are of course different because the intermediate bytecode is different. The principle is the same though.
这篇关于即时编译器和解释器有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:即时编译器和解释器有什么区别?


基础教程推荐
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- 验证是否调用了所有 getter 方法 2022-01-01
- 多个组件的复杂布局 2022-01-01
- 从 python 访问 JVM 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- 大摇大摆的枚举 2022-01-01
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- Java Swing计时器未清除 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01