| Sure. Here are some resources: * Span<T>: https://learn.microsoft.com/en-us/archive/msdn-magazine/2018... * C# now has a limited borrow checker-like mechanism to safely handle local references: https://em-tg.github.io/csborrow/ * Here is a series of articles on the topic: https://www.stevejgordon.co.uk/writing-high-performance-csha... * In general, avoid enterprise style C# (ie., lots of class and design patterns) and features like LINQ which allocate a lot of temporaries. |
Also can recommend reading all the performance improvements blog posts by Stephen Toub as well as learning to understand disassembly at a basic level which .NET offers a few convenient tools to get access to.