JIT compilation(即时编译):一种在程序运行过程中把中间形式(如字节码)按需编译为机器码的技术,常用于虚拟机与运行时环境(如 JVM、.NET),以在执行时根据热点代码进行优化,从而提升性能。也常被称为 just-in-time 编译。(除“即时编译”外,在不同语境下还可能涉及更广义的“运行时编译/动态编译”。)
/ˌdʒeɪ aɪ ˈtiː ˌkɑːmpəˈleɪʃən/
JIT compilation can speed up your app after it runs for a while.
JIT 编译会在应用运行一段时间后让它变得更快。
By using runtime profiling, JIT compilation optimizes hot paths and can outperform purely interpreted code.
通过运行时性能分析,JIT 编译会优化热点路径,性能甚至可能超过纯解释执行的代码。
JIT 是 just-in-time(恰好在需要时) 的缩写,强调“在执行前一刻才编译”的时机;compilation 来自拉丁语词根,含“汇集、编译”之意,在计算机领域专指把源代码或中间代码转换成可执行的机器指令。合起来就表示“在运行时按需进行的编译”。