You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original StringWriter.Write/WriteLine(ReadOnlySpan<char>) methods are optimized only for the StringWriter type itself, not derived classes. For derived classes, these methods copy the provided Span to an array from ArrayPool and fall back to Write(char[], int, int) method for backward compatibility with code created before the Span type existed.
Explicit overrides in the ReusableStringWriter class that call StringBuilder.Append directly help to avoid the overhead of ArrayPool.Rent/Return and copying.
0 commit comments