C
C#3w ago
Super

is linq capable of utilizing AVX1?

for operations such as sum/min/max/avg
2 Replies
canton7
canton73w ago
Take a look! https://source.dot.net/#System.Linq/System/Linq/Max.cs,6bfc5de59f92263e E.g. for int you end up here: https://source.dot.net/#System.Linq/System/Linq/MaxMin.cs,33. Provided that you're working with something like an array, there are optimized paths for all sorts
mtreit
mtreit2w ago
Yes there's a reason this benchmark shows calling the LINQ Max method is significantly faster than the naive loop you might write yourself: https://github.com/Treit/MiscBenchmarks/tree/main/MaxOfIntArray

Did you find this page helpful?