3 ms·
char ref (managed pointer) is cast to byte ref https://github.com/dotnet/coreclr/blob/04d9b557ef8b7c60a1194d062c7c2ee6e41fd8c1/src/System.Private.CoreLib/shared
by benaadams 8y ago
char ref (managed pointer) is cast to byte ref https://github.com/dotnet/coreclr/blob/04d9b557ef8b7c60a1194d062c7c2ee6e41fd8c1/src/System.Private.CoreLib/shared/System/String.Comparison.cs#L27-L37 https://github.com/dotnet/coreclr/blob/04d9b557ef8b7c60a1194...
Then it uses SpanHelpers.SequenceEqual for byte which is vectorized
https://github.com/dotnet/coreclr/blob/04d9b557ef8b7c60a1194d062c7c2ee6e41fd8c1/src/System.Private.CoreLib/shared/System/SpanHelpers.Byte.cs#L862-L916 https://github.com/dotnet/coreclr/blob/04d9b557ef8b7c60a1194...