Skip to content

Commit 099c0e1

Browse files
committed
Merge branch 'fix/vectorizing-skipwhitespaces' of https://github.com/OData/odata.net into fix/vectorizing-skipwhitespaces
2 parents b1c245a + 37eac0f commit 099c0e1

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/Microsoft.OData.Core/Json/JsonReader.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ internal class JsonReader : IJsonReader, IDisposable, IAsyncDisposable
157157
private static readonly Vector<ushort> carriageCharVector = new Vector<ushort>('\r');
158158

159159
/// <summary>
160-
///
160+
/// Represents a vector where all elements are set to ushort.MaxValue (all 1s). Used for efficient whitespace comparison operations.
161161
/// </summary>
162162
private static readonly Vector<ushort> ushortMaxValueVector = new Vector<ushort>(ushort.MaxValue);
163163

@@ -2593,12 +2593,9 @@ private int SkipWhitespacesInCurrentBuffer()
25932593
return -1;
25942594
}
25952595

2596-
else
2597-
{
2598-
// Use scalar approach for small buffers
2599-
return SkipWhitespacesScalar(
2600-
this.characterBuffer.AsSpan(this.tokenStartIndex, remaining));
2601-
}
2596+
// Use scalar approach for small buffers
2597+
return SkipWhitespacesScalar(
2598+
this.characterBuffer.AsSpan(this.tokenStartIndex, remaining));
26022599
}
26032600

26042601
/// <summary>

0 commit comments

Comments
 (0)