Closed trampster closed 3 years ago
String can be converted to ReadOnlySpan very cheaply but converting a ReadOnlySpan to a string is expensive because it requires allocating memory.
Therefore it is better for all around performance to serialize from ReadOnlySpan
Done
String can be converted to ReadOnlySpan very cheaply but converting a ReadOnlySpan to a string is expensive because it requires allocating memory.
Therefore it is better for all around performance to serialize from ReadOnlySpan