Just-in-Time Compilation とは?
just-in-time compilation は、完全に事前ではなく、プログラムの実行中に bytecode やソースをネイティブのマシンコードへ変換します。ランタイムは通常まず解釈し、その後、頻繁に実行されるメソッドを高速なネイティブコードへコンパイルします。実際の実行時の振る舞いを見られるため、静的コンパイルでは行えない最適化を適用できます。
なぜ重要か
JIT compilation は、実際の使用状況に基づいて遅延的にコンパイルすることで、bytecode の可搬性とホットコードでのほぼネイティブな速度を両立します。ウォームアップコストと実行時のチューニングが、ahead-of-time コンパイルとの違いです。
関連ガイド
What Is a Tracing JIT?A tracing JIT records the actual sequence of operations executed on a hot path and compiles that linear trace…
What Is Bytecode?Bytecode is a compact, platform-independent instruction set produced by a compiler and executed by a virtual…
What Is Profile-Guided Optimization?Profile-guided optimization feeds runtime profiling data back into the compiler so it can optimize based on h…