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;