This is a draft PR as it builds upon previous PR making use of Span based WriteBytes / WriteBytesRaw methods and using CoreBenchmarks project.
Changing string serialization to use Span based API. For strings that exceed 512 bytes (chosen arbitrarily) uses pooled byte arrays as a buffer otherwise uses stackalloc byte[byteCount].
Running String benchmark for various length string dotnet run -c Release --filter "*WriterBenchmarksString*" produces the following output
This is a draft PR as it builds upon previous PR making use of
Span
basedWriteBytes
/WriteBytesRaw
methods and usingCoreBenchmarks
project.Changing string serialization to use Span based API. For strings that exceed 512 bytes (chosen arbitrarily) uses pooled byte arrays as a buffer otherwise uses
stackalloc byte[byteCount]
.Running String benchmark for various length string
dotnet run -c Release --filter "*WriterBenchmarksString*"
produces the following output