FSharp.Stats
FSharp.Stats copied to clipboard
[Perf] Make library AOT-compatible
Hello,
It would be interesting to make this library AOT-compatible, for performance benefits.
https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/
Also adding .NET 9 as a target framework.
I tested AOT compatibility on this repo and on FSharpAux repo, both seem to be OK.
In this repo, FSharp.Status seems to not use anymore OptimizedPriorityQueue package, maybe it could be removed from the fsproj.
Thanks for reporting @alexandrehtrb It seems the PriorityQueue is used in https://github.com/zieglerSe/FSharp.Stats/blob/9cc43ef84b692ed0d68181d7e224036ddfb76335/src/FSharp.Stats/ML/Unsupervised/HierarchicalClustering.fs#L5.
@kMutagene, do you have insights regarding the AOT-compatibility
@kMutagene, do you have insights regarding the AOT-compatibility
Well it seems from the linked article that we can only know if its fine if roslyn analyzers do not throw warnings or we do not get warnings when compiling to AOT. Not sure if the first option will work for F# as F# has its own compiler and does not use roslyn. The second looks like much manual work to me.
TLDR;: only if we can do automated testing for AOT compilation
However, i agree that we might target a newer .net version (although i'd always go for LTS), i think some of the changes that @muehlhaus is working on need .net 8 anyways