Just-In-Time (JIT) Compiler
.NET 5 is exciting version of the Just-in-Time (JIT) compiler, with many improvements of all the way to finding a way to access the release. Like any compiler, improvements made to JIT can have wide-reaching effects. Often individual changes have little effect on the individual piece of the code, but such changes are then magnified by the sheer number of places they apply.
JIT has almost unlimited optimizations that can be added, and given unlimited amount of time to run such optimizations, JIT can create the most optimal code for any given scenario. But JIT does not have an unbounded amount of time. The “just-in-time” nature of JIT means it is performing the compilation as the application run: when no method has yet been complied is invoked, JIT is required to provide an assembly code for it on-demand. That means the thread will not be able to move forward until compilation has completed, which means that JIT needs to be strategic in what optimization it applies and how it selects to utilize its limited time budget.