Tiered compilation is a .NET runtime strategy that quickly compiles methods to native code, then recompiles them using execution behavior observed under load. section 10.2
The runtime uses two compilation stages:
- Performs an initial fast compilation so execution can begin quickly. section 10.2
- Recompiles code after observing how it is used under load, potentially producing better-optimized native code. section 10.2
- Can affect benchmark results, so BenchmarkDotNet uses pilot and warmup phases and gives the JIT time to complete. section 10.2
Benchmarking tiered execution
Run a BenchmarkDotNet benchmark in Release mode and allow its pilot and warmup phases to execute before comparing results. The generated summary includes environment details and result statistics. section 10.2
