This article details the settings you can use to configure .NET compilation.
Note
.NET 6 standardizes on the prefix DOTNET_
instead of COMPlus_
for environment variables that configure .NET run-time behavior. However, the COMPlus_
prefix will continue to work. If you're using a previous version of the .NET runtime, you should still use the COMPlus_
prefix for environment variables.
System.Runtime.TieredCompilation
true
- enabled
false
- disabled MSBuild property TieredCompilation
true
- enabled
false
- disabled Environment variable COMPlus_TieredCompilation
or DOTNET_TieredCompilation
1
- enabled
0
- disabled Examples
runtimeconfig.json file:
{
"runtimeOptions": {
"configProperties": {
"System.Runtime.TieredCompilation": false
}
}
}
runtimeconfig.template.json file:
{
"configProperties": {
"System.Runtime.TieredCompilation": false
}
}
Project file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TieredCompilation>false</TieredCompilation>
</PropertyGroup>
</Project>
Quick JIT
System.Runtime.TieredCompilation.QuickJit
true
- enabled
false
- disabled MSBuild property TieredCompilationQuickJit
true
- enabled
false
- disabled Environment variable COMPlus_TC_QuickJit
or DOTNET_TC_QuickJit
1
- enabled
0
- disabled Examples
runtimeconfig.json file:
{
"runtimeOptions": {
"configProperties": {
"System.Runtime.TieredCompilation.QuickJit": false
}
}
}
runtimeconfig.template.json file:
{
"configProperties": {
"System.Runtime.TieredCompilation.QuickJit": false
}
}
Project file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TieredCompilationQuickJit>false</TieredCompilationQuickJit>
</PropertyGroup>
</Project>
Quick JIT for loops
false
.System.Runtime.TieredCompilation.QuickJitForLoops
false
- disabled
true
- enabled MSBuild property TieredCompilationQuickJitForLoops
false
- disabled
true
- enabled Environment variable COMPlus_TC_QuickJitForLoops
or DOTNET_TC_QuickJitForLoops
0
- disabled
1
- enabled Examples
runtimeconfig.json file:
{
"runtimeOptions": {
"configProperties": {
"System.Runtime.TieredCompilation.QuickJitForLoops": false
}
}
}
runtimeconfig.template.json file:
{
"configProperties": {
"System.Runtime.TieredCompilation.QuickJitForLoops": false
}
}
Project file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TieredCompilationQuickJitForLoops>true</TieredCompilationQuickJitForLoops>
</PropertyGroup>
</Project>
ReadyToRun
1
.COMPlus_ReadyToRun
or DOTNET_ReadyToRun
1
- enabled
0
- disabled Profile-guided optimization
This setting enables dynamic (tiered) profile-guided optimization (PGO) in .NET 6 and later versions.
Setting name Values Environment variableDOTNET_TieredPGO
1
- enabled
0
- disabled MSBuild property TieredPGO
true
- enabled
false
- disabled
Profile-guided optimization (PGO) is where the JIT compiler generates optimized code in terms of the types and code paths that are most frequently used. Dynamic PGO works hand-in-hand with tiered compilation to further optimize code based on additional instrumentation that's put in place during tier 0.
ExamplesProject file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TieredPGO>true</TieredPGO>
</PropertyGroup>
</Project>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4