Improve performance of String.Equals(..., OrdinalIgnoreCase) (#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)
commitdd6c69022fbbe4111551f76bb9f9804538cf1e2e
tree706efc6789abe4114071426edafe79c13adb1277
parent87dbecdc9eb6c2f2ec8550f5e2284be73c3b5643
Improve performance of String.Equals(..., OrdinalIgnoreCase) (#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
src/System.Private.CoreLib/shared/System/Globalization/CompareInfo.cs
src/System.Private.CoreLib/shared/System/StringComparer.cs
src/System.Private.CoreLib/shared/System/Text/Utf16Utility.cs