Tracing JITとは?
tracing JITは、hot loopのように頻繁に実行される経路を特定し、そこを通る具体的な操作の並びを記録するjust-in-timeコンパイラです。その一直線のtraceを最適化された機械語にコンパイルし、実行が記録された経路から外れた場合にインタプリタへ戻るguardを挿入します。実際のtraceに注目することで、積極的な特化が可能になります。
なぜ重要か
プログラムが実際にたどる正確な経路を最適化することで、tracing JITはメソッド単位のコンパイラが汎用的に保たざるを得ないbranchや型を特化して取り除けます。guardとfallback処理は、その特化のコストです。
関連ガイド
What Is Just-in-Time Compilation?Just-in-time compilation translates code to native machine instructions at runtime, often focusing effort on…
What Is Profile-Guided Optimization?Profile-guided optimization feeds runtime profiling data back into the compiler so it can optimize based on h…
What Is Bytecode?Bytecode is a compact, platform-independent instruction set produced by a compiler and executed by a virtual…