IEnumerable<T>.Max and .Min are the same as they were just significantly faster through the use of SIMD:
https://github.com/dotnet/runtime/blob/ebbebaca1184940f06df6...You could implement a similar (and simpler) fast path for types with contiguous memory by performing min and max per iteration instead.