Skip to content

Commit bcf9938

Browse files
authored
Mark XxHash64.Complete as noinline (#90142)
1 parent 749b2d2 commit bcf9938

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash64.State.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ private static ulong ApplyRound(ulong acc, ulong lane)
9797
return acc;
9898
}
9999

100+
// Inliner may decide to inline this method into HashToUInt64() with help of PGO and
101+
// can run out of "time budget" producing non-inlined simple calls such as Span.Slice.
102+
// TODO: Remove NoInlining when https://github.com/dotnet/runtime/issues/85531 is fixed.
103+
[MethodImpl(MethodImplOptions.NoInlining)]
100104
internal readonly ulong Complete(long length, ReadOnlySpan<byte> remaining)
101105
{
102106
ulong acc = _hadFullStripe ? Converge() : _smallAcc;

0 commit comments

Comments
 (0)