即时编译器和解释器有什么区别?

2023-10-14Java开发问题
1

本文介绍了即时编译器和解释器有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

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

  1. 直接执行源代码
  2. 将源代码翻译成一些有效的中间表示(代码)并立即执行
  3. 显式执行由编译器生成的存储的预编译代码这是解释器的一部分系统

标准的 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.

这篇关于即时编译器和解释器有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

如何使用 JAVA 向 COM PORT 发送数据?
How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)...
2024-08-25 Java开发问题
21

如何使报表页面方向更改为“rtl"?
How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)...
2024-08-25 Java开发问题
19

在 Eclipse 项目中使用西里尔文 .properties 文件
Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)...
2024-08-25 Java开发问题
18

有没有办法在 Java 中检测 RTL 语言?
Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)...
2024-08-25 Java开发问题
11

如何在 Java 中从 DB 加载资源包消息?
How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)...
2024-08-25 Java开发问题
13

如何更改 Java 中的默认语言环境设置以使其保持一致?
How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)...
2024-08-25 Java开发问题
13