Standard-Toolkit
Standard-Toolkit copied to clipboard
[Feature Request]: Use `Span<>` for all `foreach` loops
As part of .NET 7, it is recommended to use Span<> instead of foreach, as it's generally faster.
Vote for this one! Thank you! Span<> should become a standard in .NET, but many are still using IEnumerable<> interface (myself included :) It's hard to get use to it after so many years. Recently I updated one of my very old parsers which usually has to process billions of lines from multiple sources. After adapting code to ReadOnlySpan<> I measured over 50% perf. improvement and significantly less pressure on heap and GC activity (due to Span is always on stack). I wanted to add this request myself then I saw yours post :) Cool ! Thnx!
The "Number of loops" in Krypton is rather small, and the updating of the UI takes a lot more CPU than using span on small loops. What takes most of the time is using the vtable lookup's for the colours
The "Number of loops" in Krypton is rather small, and the updating of the UI takes a lot more CPU than using span on small loops. What takes most of the time is using the vtable lookup's for the colours
Closing.