diff --git a/src/libraries/System.Private.CoreLib/src/System/Guid.cs b/src/libraries/System.Private.CoreLib/src/System/Guid.cs index 150e0f94da9f6..25df001744576 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Guid.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Guid.cs @@ -5,9 +5,9 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; using System.Runtime.Versioning; namespace System @@ -858,6 +858,11 @@ public override int GetHashCode() private static bool EqualsCore(in Guid left, in Guid right) { + if (Vector128.IsHardwareAccelerated) + { + return Vector128.LoadUnsafe(ref Unsafe.As(ref Unsafe.AsRef(in left))) == Vector128.LoadUnsafe(ref Unsafe.As(ref Unsafe.AsRef(in right))); + } + ref int rA = ref Unsafe.AsRef(in left._a); ref int rB = ref Unsafe.AsRef(in right._a);