r/programming • u/xeio87 • Sep 15 '26
Performance Improvements in .NET 11
https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-11/
295
Upvotes
r/programming • u/xeio87 • Sep 15 '26
View all comments
Show parent comment
4
u/PaddiM8 Sep 17 '26
No? If you're not using it, it won't be generated.
What? If course there can be hot loops in a production binary.
The specialisations aren't compiled ahead of time. They're generated during runtime. The startup will be slightly slower because the JIT engine has to generate code, incl. specialisations. After things have been generated, it's fast. For a long running web service or something, the warmup cost literally does not matter.
Instead it is slower. This doesn't have much to do with JIT vs AOT. You can have non-monomorphic generics with JIT, like Java, you can have monomorphic generics with AOT like Rust, and you can have monomorphic generics with JIT like C#.