Allocation free ‘async’ Methods

Task Asynchronous Programming (TAP) model will go down as one of the landmark of C# language revolution. The typical method signature with return type Task/Task<T> has since then made significant appearances in our programming life. But despite all its glorious functionalities, it needs to be noted that it comes at a certain cost - performance … Continue reading Allocation free ‘async’ Methods

Updated Span API : NonPortableCast and AsReadOnlySpan to MemoryMarshal.Cast and AsSpan

One of the interesting changes (not sure why Microsoft changed this) was moving/changing the Span<T> API's a bit. For example, the Span<T>.NonPortableCast Method was moved as an extension method under MemoryMarshal. Previous API Current API Similarly, the string.AsReadonlySpan method has been renamed. The new API is as follows. Previous API Current API The MemoryMarshal extensions … Continue reading Updated Span API : NonPortableCast and AsReadOnlySpan to MemoryMarshal.Cast and AsSpan