-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable AVX-512 for string/span Equals/StartsWith #84885
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsContributes to #77034 A small clean up in Benchmark:private string TestData =>
"https://github.com/dotnet/runtime/blob/main/CONTRIBUTING.md?r=0";
[Benchmark]
public bool Test() => TestData.StartsWith(
"https://github.com/dotnet/runtime/blob/main/CONTRIBUTING.md",
StringComparison.OrdinalIgnoreCase); codegen diff for
10x faster (Ryzen 7950x, win11-x64)
|
/benchmark json aspnet-citrine-win runtime |
Benchmark started for json on aspnet-citrine-win with runtime. Logs: link |
@tannergooding @BruceForstall @dotnet/avx512-contrib PTAL, no impact on TE, SPMI diffs are empty due to missing contexts - lots of missing contexts mean it found quite a few places for avx512 path, jit-utils found +16kb diff on BCL. |
Contributes to #77034
A small clean up in
impExpandHalfConstEqualsSIMD
to make it SIMD size agnostic. At some point I plan to unify this withLowerCallMemcmp
but currently they're different: this one hasOrdinalIngoreCase
support and produces better codegen when data is half constant (not just length).LowerCallMemcmp
will aslo be removed because we need a new phase where we can rely on SSA/VN to keep all existing optimizations.Benchmark:
(Ryzen 7950x, win11-x64)
codegen diff for
Test_IgnoreCase()
:Was:
New codgen:
AVX-512 is used for
[32..64]
length range (in utf16)