In this post, I looked at the performance of a popular helper method suggested in the csharp subreddit, a way to avoid using List.Contains.
It looks at the impact of params ReadOnlySpan<T>, of switching to if statements, and how net8 stacks up to the preview net10.
breve•6mo ago
What about AOT compilation? How does that compare?
eterm•6mo ago
That's a good question, I've never tried to benchmark AoT compiled code. I don't know how to do it with BenchmarkDotNET. I believe the way BDM works is that it compiles sub-assemblies to execute the benchmarks, so it would have to be those, not the benchmark runner that would need the AOT compilation step?
breve•6mo ago
It should just be another compilation target. Here's the documentation on NativeAOT with BenchmarkDotNet:
eterm•6mo ago
It looks at the impact of params ReadOnlySpan<T>, of switching to if statements, and how net8 stacks up to the preview net10.
breve•6mo ago
eterm•6mo ago
breve•6mo ago
https://benchmarkdotnet.org/articles/configs/toolchains.html...