Improve performance of String.Equals(..., OrdinalIgnoreCase) (dotnet/coreclr#20734)
authorLevi Broderick <GrabYourPitchforks@users.noreply.github.com>
Sat, 3 Nov 2018 00:15:47 +0000 (17:15 -0700)
committerGitHub <noreply@github.com>
Sat, 3 Nov 2018 00:15:47 +0000 (17:15 -0700)
commitbc8ec6cda96c80fa772ed1a2460f033200284b19
tree1354115c50e61a1d6556e713837a158b7f87d429
parentcc97f6ba2362804d2e49efad0df0df73bd6e81d1
Improve performance of String.Equals(..., OrdinalIgnoreCase) (dotnet/coreclr#20734)

- Tries to consume multiple chars in parallel when possible
- Didn't vectorize because inputs to this function are generally fairly small
- Moved static GlobalizationMode lookup out of hot path
- Removed indirection so that StringComparer now calls directly into workhorse routine

Commit migrated from https://github.com/dotnet/coreclr/commit/dd6c69022fbbe4111551f76bb9f9804538cf1e2e
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.cs
src/libraries/System.Private.CoreLib/src/System/StringComparer.cs
src/libraries/System.Private.CoreLib/src/System/Text/Utf16Utility.cs