-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to make this aot-friendly? #185
Comments
First of all, thanks for using AoCHelper and for raising this issue. I'm happy to evaluate your feature request to make the library AOT friendly. However, I'm surprised regarding the reason behind it, since in my experience, .NET Native AOT compiled code is generally slower than its equivalent JIT version (as of today). Less memory allocating, faster to start, smaller sized; but slower in its execution. |
Hi! Thats interesting. I don't have much experience with AOT and I don't know really what I'm missing without JIT. Yesterday was the very first time I tried AOT actually. I compiled my solution for star 5 part 2 this year with AOT, and time taken executing the code dropped from above 6ms to just under 2ms. :) One of my collegues is solving in rust, and I thought aot could help me beat him. :P |
What I would recommend you is to use BenchmarkDotNet to properly measure the performance of the code, AoCHelper results are just an approximation and you shouldn't rely on them for anything super serious, such as comparing your results with your colleagues 😜 Going back to the JIT/AOT topic, your mileage might vary of course, but some JIT optimizations take place when you run your code multiple times, one of the reasons why proper benchmarking methods such as BDN 'warm up' the code before executing it, even if they execute it multiple times. |
I've enabled AOT analyzers locally and they're emitting warnings about the usage of:
I don't see an immediate way to achieve those two goals without reflection, so I don't see an easy way to make Please let me know if you come up with any ideas how to achieve this goal |
Source generators would do it. I might try it someday |
Yeah, I've been playing with them lately and they could be an option, maybe something like Apparatus.AOT.Reflection would be useful or serve an inspiration. Given it's already end of November, I'll have to ship v4 later later this week (adding .NET 9 support and dropping .NET 6 and 7 one) without having addressed this issue yet, I'm afraid. |
It would be nice to get better performance!
The text was updated successfully, but these errors were encountered: