Readers who have followed me for some time will know that I have developed a bit of a passion for performance improvements and avoiding allocations in critical code paths. Previous blog posts have touched on examples of using Span<T> as one mechanism to prevent allocations when parsing data and using ArrayPool to avoid array allocations […]
Category: C#
C# 8.0: Understanding Using Declarations
In this post, I introduce a simple new language feature of C# 8 called using declarations. Based on the odd tweet or two that I have seen pass through my Twitter feed, this feature is like Marmite (sorry, UK reference there). You either love it or you hate it. The opinions seem to be quite […]
Using the BodyReader and BodyWriter in ASP.NET Core 3.0 Utilising System.IO.Pipelines for High-Performance ASP.NET Core 3.0
In this post, I will describe a scenario and potential use case for the BodyReader and BodyWriter properties which are now exposed in ASP.NET Core 3.0 via the HttpContext on the HttpRequest and HttpResponse respectively. Note, that I’m working with these during Preview 6 of the 3.0 release, so things may have changed a little […]
Using High-Performance Techniques to Base64 Encode a GUID Writing High-Performance C# and .NET Code: Part 8
It’s been a little while since my last high-performance post, but my use of the techniques and features continues! In this post, I want to present a more practical example which I hope will help to illustrate a real-world use case for some of the new .NET Core performance focused API changes. Scenario For a […]