3 ms·
> most libraries use the hell out of it Most libraries used in a typical LoB or web apps — yeah, probably. However, in performance-critical C# LINQ ain’t even
by Const-me 2y ago
> most libraries use the hell out of it
Most libraries used in a typical LoB or web apps — yeah, probably. However, in performance-critical C# LINQ ain’t even applicable because Span<T> and ReadOnlySpan<T> collections don’t implement the IEnumerable<T> interface required by the LINQ functions.
Here’s couple examples of relatively complicated logic which uses loops instead of LINQ:
https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Audio/ALSA/AlsaPlayer.cs#L121-L143 https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Aud...
https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Containers/MP4/Readers/SampleReader.seek.cs#L34-L52 https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Con...