4 ms·
I haven't completely followed the AOT stuff, but I remember hearing some stuff about some reflection-heavy code doesn't play well with AOT. But .NET has a grea
by mdasen 3y ago
I haven't completely followed the AOT stuff, but I remember hearing some stuff about some reflection-heavy code doesn't play well with AOT.
But .NET has a great option in this case: ReadyToRun. Basically, it AOT compiles a ton of stuff, but also creates the byte code which can be JIT optimized at runtime. The file output is larger which is a downside, but is usually a very minute downside. ReadyToRun takes care of start up times because you have the machine code to get things running fast. Plus, the JIT can sometimes make optimizations that can't be done at compile time so you can end up with better overall performance (at the cost of a larger executable file).
One of the things that is nice about .NET is that a lot of things come with sustained, multi-year effort with some good things coming every year. Microsoft is working on making more and more of .NET AOT-friendly and really upgrading the way things are done. Along the way, there are things like ReadyToRun which work really well for what most people want/need.