Skip to content

Commit

Permalink
Mark XxHash64.Complete as noinline (#90142)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBo authored Aug 8, 2023
1 parent 749b2d2 commit bcf9938
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ private static ulong ApplyRound(ulong acc, ulong lane)
return acc;
}

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

0 comments on commit bcf9938

Please sign in to comment.