Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using stackalloc instead of new byte[x] on Streams (#88303)
* first XOR Linq implemetation * replace classic allocation by stack allocation for ReadByte * replace classic allocation by stack allocation for ReadByte & WriteByte * replace classic allocation by stack allocation for ReadByte/CopyToAsync * add missing ConfigureAwait(false) on ReadAsync * replace classic allocation by stack allocation for ReadByte/WriteByte * Revert "first XOR Linq implemetation" This reverts commit 449fdde. * indent fix * rollback stackalloc on async methods * missing char * fix ConfigureAwait * rollback ReadByte optim (degrade perfs) * variablename fix * missing comment * rollback Stream allocations * missing arguments * add Write(ReadOnlySpan<byte>) method * better initialize Span * add CRLF * resolve comments * simplification call method Write * Update src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonEncodingStreamWrapper.cs replace Span by ReadOnlySpan Co-authored-by: Michał Petryka <[email protected]> * remove trailing whitespace * Update src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonEncodingStreamWrapper.cs Co-authored-by: Stephen Toub <[email protected]> * Update src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonEncodingStreamWrapper.cs Co-authored-by: Stephen Toub <[email protected]> --------- Co-authored-by: Michał Petryka <[email protected]> Co-authored-by: Stephen Toub <[email protected]>
- Loading branch information