NativeAOT compared with GraalVM/LLVM missing features. Any plans for them? #117454
-
Hello .Net team! First of all I appreciate all the great work on .Net in general and NativeAOT in particular. My understanding (at least according to how it is built now) is that NativeAOT works on a closed world and I've seen 3 areas which seem to me at least from outside (I never looked inside of the codebase itself, neighter of .Net Core, nor GraalVM, nor LLVM, but trough announcements) are these:
To be clear, I am not suggesting that .Net must implement LLVM register allocator, but if there's one register allocator that it can be slower and generate better code, but opt-in and that is more efficient when choosing optimization level for performance, sounds to me like a good win for everyone. And in future (say 3 years from now when you are sure that there are no bugs with it) swap it as a default in NativeAOT.
But as for me, the order is likely from top to bottom in this order, because Class Hierarchy Analysis and automatic devirtualization really means that users will likely get free performance in large apps (I am thinking something like Avalonia apps which are 20-30 MB a piece, not including assets). Thank you for the work you did it again! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
This was implemented in the very early development of NativeAOT. There are improvement PRs like #97867.
This is not a NativeAOT topic. It uses the same codegen and register allocator with JIT. Improvements in each area are always welcomed.
This is very costful optimization with unknown benefit. In .NET we prefer to expose SIMD build blocks to simplify manual adoption ( |
Beta Was this translation helpful? Give feedback.
-
I wrote an article on some of the optimizations that are specific to native AOT: https://migeel.sk/blog/2023/11/22/top-3-whole-program-optimizations-for-aot-in-net-8/. Of course since native AOT uses the same code generator (RyuJIT) as the JIT-based CoreCLR version, native AOT also gets most of optimizations that the JIT can do, minus dynamic optimizations that are based on program execution (things like dynamic PGO). I don't have much else to add besides what Huo already covered above. |
Beta Was this translation helpful? Give feedback.
This was implemented in the very early development of NativeAOT. There are improvement PRs like #97867.
This is not a NativeAOT topic. It uses the same codegen and register allocator with JIT. Improvements in each area are always welcomed.
This is very costful optimization with unknown benefit. In .NET we prefer to expose SIMD build blocks to simpli…