http://net-informations.com/faq/qk/jit.htm

Compilers are tools that convert human readable text into machine code. The terms Ahead-of-Time (AOT) and Just-in-Time (JIT) refer to when compilation takes place: the "time" referred to in those terms is "runtime", i.e. a JIT compiler compiles the program as it is running, an AOT compiler compiles the program before it is running.

faster

In theory, a Just-in-Time (JIT) compiler has an advantage over Ahead-of-Time (AOT) if it has enough time and computational resources available. A JIT compiler can be faster because the machine code is being generated on the exact machine that it will also execute on. This means that the JIT has the best possible information available to it to emit optimized code.

optimization

JITs can in fact do some optimizations that Ahead-of-Time (AOT) compilers cannot. With a traditional compiler/optimization system, you have to guess which parts are important. With a Just-in-Time (JIT) optimization, you can first measure which parts are actually used, and optimize that. This means that JIT will compile only those parts that user care about, leaving potentially 80% of code untouched, saving time and memory. If you pre-compile bytecode into machine code, the compiler cannot optimize for the target machine(s), only the build machine.

platform-specific

Because the JIT-compilation takes place on the same system that the code runs, it can be very, very fine-tuned for that particular system. If you do Ahead-of-Time (AOT) compilation (and still want to ship the same package to everyone, in this case you have to compromise.

run-time metrics

A JIT-compiler can not only look at the code and the target system , but also at how the code is used. It can instrument the running code, and make decisions about how to optimize according to, for example, what values the method parameters usually happen to have.

Disadvantages

  1. Large applications generally benefit from being compiled ahead-of-time, but small ones generally don't
  2. Native images load faster because they don't have much startup activities, and require a static amount of fewer memory (the memory required by the JIT compiler).

JIT和AOT的区别的更多相关文章

  1. Android里的Dalvik、ART、JIT、AOT有什么关系?

    JIT,Just-in-time,即时编译,边运行边编译: AOT,Ahead Of Time,提前编译,指运行前编译. 区别 这两种编译方式的主要区别在于是否在“运行时”进行编译 优劣JIT优点: ...

  2. ART、JIT、AOT、Dalvik之间的关系

    原文地址: https://github.com/ZhaoKaiQiang/AndroidDifficultAnalysis/blob/master/10.ART%E3%80%81JIT%E3%80% ...

  3. JIT和AOT编译详解

    JIT和AOT编译介绍 JIT - Just-In-Time             实时编译,即时编译 通常所说的JIT的优势是Profile-Based Optimization,也就是边跑边优化 ...

  4. Android里的 ART、JIT、AOT、Dalvik之间有什么关系?

    ART.JIT.AOT.Dalvik之间有什么关系? JIT与Dalvik JIT是"Just In Time Compiler"的缩写,就是"即时编译技术", ...

  5. Dart的JIT 与 AOT

    JIT:Just In Time AOT:Ahead of Time 含义: 目前,程序主要有两种运行方式:静态编译与动态解释. 静态编译的程序在执行前全部被翻译为机器码,通常将这种类型称为AOT ( ...

  6. Unity的JIT和AOT实现

    https://myhloli.com/about-il2cpp.html JIT方式: Unity的跨平台技术是通过一个Mono虚拟机实现的.而这个虚拟机更新太慢,不能很好地适应众多的平台. And ...

  7. ART、JIT、AOT、Dalvik之间有什么关系?

    JIT与Dalvik JIT是"Just In Time Compiler"的缩写,就是"即时编译技术",与Dalvik虚拟机相关. 怎么理解这句话呢?这要从A ...

  8. ng build --aot 与 ng build --prod

    angluar的编译有以下几种方式: ng build  常规的压缩操作    代码体积最大 ng build --aot   angular预编译      代码体积较小 ng build --pr ...

  9. Flutter开发进阶学习指南Flutter开发进阶学习指南

    Flutter 的起源 Flutter 的诞生其实比较有意思,Flutter 诞生于 Chrome 团队的一场内部实验, 谷歌的前端团队在把前端一些"乱七八糟"的规范去掉后,发现在 ...

  10. 如何高效、快速学习Flutter?如何避坑?(文末送服福利)

    稳住,今天是周末,不过我今天要上班....啊..啊... 对于 Flutter 我没有太多的发言权,不过GSY是对 Flutter 充分理解并精深掌握的前辈了,所以转一篇他对 Flutter 的一些解 ...

随机推荐

  1. 2023.3.4Leecode982按位与为零的三元组

    题目的要求 给你一个整数数组 nums ,返回其中 按位与三元组 的数目. 按位与三元组 是由下标 (i, j, k) 组成的三元组,并满足下述全部条件: 0 <= i < nums.le ...

  2. elasticsearch 内存分配设置

    一.背景 elasticsearch版本为2.3.3 elasticsearch 默认安装后设置的内存是1GB,对于现实业务来说太小 预计在五台机器上配置elasticsearch构建集群,但是构建索 ...

  3. How to present a paper 怎么讲好一篇文献

    Author : 如果在冬夜一个旅人 Date : 2022/05/24 目录 背景说明 1 读文献 1.1 读文献的层次 1.2 论文阅读的首轮次序 2 讲文献 2.1 The Problem to ...

  4. 20230103~05code

    目录 U190849 最简分式 P5734 [深基6.例6]文字处理软件 P1104 生日 P4305 [JLOI2011]不重复数字 P8218 [深进1.例1]求区间和 P3397 地毯 P236 ...

  5. i18n多语言 解决页面一刷新就恢复默认语言问题

  6. ACGAN-pytorch

    点击查看代码 import argparse import os import numpy as np import torch import torch.nn as nn import torchv ...

  7. M1芯片使用pod报错 *** for architecture arm64

    1.添加如下配置 pod 和 工程都需要修改 2.Podfile最后添加如下代码 post_install do |installer| installer.pods_project.build_co ...

  8. C++ 手动创建二叉树,并实现前序、中序、后序、层次遍历

    二叉树的创建是个麻烦事,我的思路是:首先将一个普通的二叉树转化为满二叉树,其中的空节点用一些标识数据来代替,如此一来,就可以用数组索引来描述数据在二叉树的什么位置了. 比如,数组[2,4,3,1,5, ...

  9. mysql:数据库加解密查询

    解密:SELECT CONVERT (AES_DECRYPT(UNHEX( column_name), '密钥') USING utf8) AS column_name,from table_name ...

  10. git如何把本地文件夹和远程仓库关联

    场景: 1,有一个本地项目,没有上传到git过,你在远程新建了一个仓库,想把这个本地的代码推送到该仓库 2,直接想把本地代码推送到远程并创建该本地文件对应的仓库(这种情况不可以实现) 解决方法: 本地 ...