Одним из значимых нововведений в .NET Core 2.1 стала поддержка Span<T>. В публикации рассматривается, как правильно использовать новый тип и чего лучше не делать, чтобы не получить неожиданно проблем.
https://vcsjones.dev/2020/02/24/stackalloc
#stackalloc #span
https://vcsjones.dev/2020/02/24/stackalloc
#stackalloc #span
vcsjones.dev
Dos and Don'ts of stackalloc
Span made stackalloc safe-ish to use, but it still has sharp edges.
Тонкости использования ref struct при работе с асинхронными методами.
https://blogs.endjin.com/2020/03/high-performance-c-a-test-pattern-for-ref-structs
#ref #struct #async
https://blogs.endjin.com/2020/03/high-performance-c-a-test-pattern-for-ref-structs
#ref #struct #async
Endjin
High-performance C#: a test pattern for ref structs | endjin
C# 7.2 introduce ref structs, a new kind of type (Span is a ref struct) designed to support certain high performance scenarios. There are constraints around their use, and when writing unit tests for our Ais.Net parser, this caused some challenges. This blog…