title: Ngen vs RyuJIT - fastest x64 running code when (pre-)startup does not matter
body: <p>Are Ngen and RyuJIT two completely unrelated things under .NET 4.6 (especially with different optimization techniques and algorithms)?</p>
  
  <p>What produces fastest (better optimized) x64 native code if we do not care about the cost of jitting itself and/or cold/warm startup time?</p>
  
  <p>We are running a long running server app. The continuous running phase is very important performance-wise. The (pre-)startup phase is unimportant for us. Until now we have been on .NET 4.5 and always generated native images by Ngen.
  We are now in process of upgrading to .NET 4.6 and we want to be sure that this doesn't downgrade the performance of our continuous running phase. I have read some info that RyuJIT is great choice for improving the JITing time, but that the jited code can be less optimized compared to Ngen - see e.g. <a href="https://github.com/dotnet/coreclr/issues/1299#issuecomment-125967353" rel="noreferrer">this github comment on one of the RyuJIT bugs</a>.  </p>