Interesting new .NET feature already available for .NET 4.5, but much faster in future .NET versions: [WayBack] C# – All About Span: Exploring a New .NET Mainstay
Documentation (only quoted first paragraph):
Span<T>
is a new type we are adding to the platform to represent contiguous regions of arbitrary memory, with performance characteristics on par withT[]
. Its APIs are similar to the array, but unlike arrays, it can point to either managed or native memory, or to memory allocated on the stack.
Further on in that document are the Design specifications.
Via:
- [WayBack/Archive.is] Miguel de Icaza on Twitter: “Read about a major upgrade to the .NET platform: https://t.co/MUdU7UZnuI”
- [WayBack/Archive.is] Matt Warren on Twitter: “Just reading this great post by Stephen Toub ‘C# – All About Span: Exploring a New .NET Mainstay’ I did not know you could use Span to do… https://t.co/pOGQQ0ubnR”
–jeroen