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).

最新文章

  1. SSH使用详解
  2. PHP无限极分类,多种方法|很简单,这里说的很详细,其它地方说的很不好懂
  3. JavaWeb---设置content-disposition响应头,让浏览器下载文件
  4. Verilog学习笔记设计和验证篇(四)...............状态机的置位与复位
  5. C/C+小记
  6. 关于spring 3.0.5的 <mvc:resources mapping="***" location="***">标签的使用
  7. [Warning] TIMESTAMP with implicit DEFAULT value is deprecated
  8. 团体程序设计天梯赛-练习集L1-002. 打印沙漏
  9. JSON取值(key是中文或者数字)方式详解
  10. merge into的用法及10g新特性总结
  11. php开发之常用验证方法
  12. VUE 多页面配置(一)
  13. ThinkPHP 3.2 支付宝即时到账接口开发
  14. Python编写API接口
  15. P1983 车站分级
  16. GoAhead2.5移植到ARM教程
  17. (转)SQL Server内存遭遇操作系统进程压榨案例
  18. HDU2680 Choose the best route 2017-04-12 18:47 28人阅读 评论(0) 收藏
  19. iOS 获取 UITabViewController 和 UINavigationController 的图标位置
  20. webstorm中sass编译时目录或内容包含中文字符报错

热门文章

  1. mongodump导出mongodb中的数据
  2. word2021自带viso屏幕闪烁、抖动问题解决
  3. Python elasticsearch_dsl 报错及解决方法
  4. 判断PC端与移动端跳转
  5. sparksql的join有哪些及实现原理
  6. Linux 部署apache2.4
  7. Flutter 登录与list列表demo
  8. 蓝牙mesh消息包与以太网帧的分层构成
  9. linux磁盘读写速度测试
  10. Android集成并开启手写笔识别