Skip to content

Update BitArray.CopyTo to use the xplat intrinsics #116079

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

Open
tannergooding opened this issue May 28, 2025 · 2 comments · May be fixed by #115069
Open

Update BitArray.CopyTo to use the xplat intrinsics #116079

tannergooding opened this issue May 28, 2025 · 2 comments · May be fixed by #115069
Labels
area-System.Collections help wanted [up-for-grabs] Good issue for external contributors

Comments

@tannergooding
Copy link
Member

As per #114818 (comment), BitArray.CopyTo could benefit from using the cross platform intrinsic APIs rather than the platform specific ones.

This can be achieved by swapping out these API calls:

  • Avx512BW.IsSupported -> Vector512.IsHardwareAccelerated
  • Avx512BW.Shuffle(x, y) -> Vector512.Shuffle(x, y)
  • Avx512F.And(x, y) -> x & y
  • Avx512BW.Min(x, y) -> Vector512.Min(x, y)
  • Avx512F.Store(x, y) -> y.Store(x)

Similar changes could also be made to the Avx2 path (using Vector256) and so on.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 28, 2025
@tannergooding tannergooding added area-System.Collections help wanted [up-for-grabs] Good issue for external contributors and removed area-System.Runtime.Intrinsics untriaged New issue has not been triaged by the area owner labels May 28, 2025
Copy link
Contributor

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

1 similar comment
Copy link
Contributor

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

@tfenise tfenise linked a pull request May 29, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Collections help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant