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