Span<T> and Memory<T> are modern .NET types for working with contiguous memory (arrays, strings, buffers) efficiently — without allocations or copying. They enable high-performance code by providing a view into existing memory rather than creating new copies, reducing GC pressure.
