c# – What is JIT warm-up?


In articles on Habré, I met in the comments a mention of the so-called "Warming up the JIT".

What it is?


JIT stands for Just In Time, that is, "just in time". JIT compilation translates the virtual machine bytecode into the machine code of the physical machine exactly at the moment when it is required for the first time. (This means, in particular, that if a method has never been called while the program is running, it is not translated.)

A method compiled once remains in memory (cached) and is executed immediately on subsequent calls.

Accordingly, at the start of the program, JIT compilation is performed quite often, and as it works, it becomes less and less common. In general, the program starts to run faster. This behavior allows us to talk about "warming up".

Scroll to Top