The first few times you execute some code, the C# runtime is going to optimize it in the background – this is known as “JIT”, or “Just in Time compiling”. So if the code you’re measuring is meant to be repeated many times – say, in a loop that’s running 24h/24, then you want to measure how long it takes after the JIT is done, since that’s what’s going to be running most of the time.
7
solved Why wouldn’t I just run my performance benchmarks without debugging instead of “warming up” the code? [closed]