Skip to content
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

Improve TeddyHelper.RightShift helpers for AVX512 #107819

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MihaZupan
Copy link
Member

Instead of a PermuteVar8x64x2 + AlignRight, we can do the whole thing with a byte-based permute PermuteVar64x8x2.

public class SearchValuesString
{
    private static readonly SearchValues<string> s_values = SearchValues.Create(["abc", "def", "ghi"], StringComparison.Ordinal);
    private static readonly string s_text = new('\n', 100_000);

    [Benchmark]
    public void ContainsAny() => s_text.AsSpan().ContainsAny(s_values);
}
Method Toolchain Mean Error Ratio
ContainsAny main 2.284 us 0.0320 us 1.00
ContainsAny pr 2.006 us 0.0064 us 0.88

@MihaZupan MihaZupan added this to the 10.0.0 milestone Sep 13, 2024
@MihaZupan MihaZupan self-assigned this Sep 13, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-memory
See info in area-owners.md if you want to be subscribed.

@MihaZupan MihaZupan requested a review from Copilot February 7, 2025 22:30

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant