JIT and AOT in the CLR
summary
Explains concrete CLR choices: first-gen ngen/engine produces Windows-only PE-style native DLLs, second-gen crossgen embeds native code into assemblies and supports servicing, and a planned third-gen (TVD) targets portable, off-machine generation and single-file deployment. Introduces tiered compilation (quick JIT then optimized JIT) with heuristics (100 ms idle → steady state; queue threshold ≈30). Reports: Hello World loads ~4,000 methods; JIT ≈7% higher throughput vs crossgen in benchmarks; aggressive AOT prototype shows ~50% improvement and a footprint as low as 400 KB.
AI-written summary · about
chapters (19)
- 0:00Intro
- 2:12What happens at startup?
- 3:41CLR design philosopy
- 6:37Design decision points for AOT tech
- 9:09First Generation AOT - NGEN
- 11:31What is being persisted by NGEN.exe?
- 14:10Taming the size
- 17:12Where do these AOT images live?
- 19:34Elevated Service Task to deal with servicing
- 21:03Second Generation AOT - CrossGen
- 28:03Simple Hello World WebApi sample
- 34:10Tiered Compilation
- 35:33Heuristic of the tiering
- 36:33Startup-phase behavior
- 37:57How to detect startup phase
- 39:58Measure again
- 44:15Recap and future
- 46:07Future of JIT
- 47:58Our experiment - CoreRT
related talks
30mAn Incremental Approach to JIT Construction
30mOn Automating Hybrid Execution of Ahead-of-Time and Just-in-Time Compiled Code
25mHybrid Execution: Combining Ahead-of-Time and Just-in-Time Compilation
46mAhead Of Time (AOT) Internals
01h 04mJust-in-Time Compilation: The Next Big Thing?
01h 01mDynamic Runtime Code with Roslyn
01h 01mFaster Compile Times and Better Performance: Bringing Just-in-Time Compilation to C++
01h 00mWhat’s New in the JIT Compiler
