Closed dzmitry-lahoda closed 5 years ago
.NET Core 3 has optimization for Spans. Specifically, it can inline ReadOnlySpans.
I have replaced uint array with custom wrapper and it works well (kind of less than 1% or less perf degradation)[1]
But I guess for byte array backed storage it may appear up to 5%.[2]
[2] https://github.com/dotnet/coreclr/issues/23620#issuecomment-486982204
I've had a look into Span/Memory. In this particular case, they offer no performance advantage over a Byte array - actually the opposite - a slight performance decrease.