From 322f27008839be53f98aaad05a2112bb65d3a601 Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Wed, 14 Dec 2022 13:58:58 +0100 Subject: [PATCH] decorate SequenceEqual with AggressiveOptimization --- .../System.Private.CoreLib/src/System/SpanHelpers.Byte.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs index 507d27822d5395..5a94191301c4df 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs @@ -566,6 +566,7 @@ internal static unsafe int IndexOfNullByte(ref byte searchSpace) // Optimized byte-based SequenceEquals. The "length" parameter for this one is declared a nuint rather than int as we also use it for types other than byte // where the length can exceed 2Gb once scaled by sizeof(T). + [MethodImpl(MethodImplOptions.AggressiveOptimization)] public static unsafe bool SequenceEqual(ref byte first, ref byte second, nuint length) { bool result;