Skip to content

Conversation

@stephentoub
Copy link
Member

I think this would only manifest as a perf rather than correctness issue.

@dotnet-policy-service
Copy link
Contributor

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an incorrect pointer increment in the Vector512 fast-path of NonPackedIndexOfAnyInRangeUnsignedNumber, which would cause unnecessary overlap/re-processing (performance impact) when Vector512 is used.

Changes:

  • Update the Vector512 loop to advance by Vector512<T>.Count instead of Vector256<T>.Count.

Copy link
Member

@MihaZupan MihaZupan left a comment

Choose a reason for hiding this comment

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

Nice catch.
Does looks like the only effect is that we were throwing away half the throughput

@stephentoub stephentoub merged commit 9a077a2 into dotnet:main Feb 1, 2026
149 of 154 checks passed
@stephentoub stephentoub deleted the fixv512 branch February 1, 2026 19:09
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.

3 participants