In both .NET 5 and .NET 6 benchmarks the ToSpan has extra allocations that don't make sense. This API wraps the native pointer from the encoders project and it shouldn't be creating any additional allocations. See benchmark table below.
The benchmarks have been ran on different machines the important value is the memory allocation
Description
In both .NET 5 and .NET 6 benchmarks the
ToSpan
has extra allocations that don't make sense. This API wraps the native pointer from the encoders project and it shouldn't be creating any additional allocations. See benchmark table below.