Skip to content

Conversation

AlexGuteniev
Copy link
Contributor

ranges::find is not using wmemchr after #5284. Yet, std::find uses it.

For wmemchr we drag in <cwchar> which is heavy, specifically due to wmemchr optimization. So it seems silly not to take the full advantage of wmemchr. The PR addresses that by making ranges::find also using wmemchr.

This affects ARM64 (non-EC), and builds with vector algorithms disabled.

See also #5596. Not sure if this PR closes that issue, because merging the PR does not preclude doing also Windows SDK throughput optimization or otherwise addressing the throughput in the future.

@AlexGuteniev AlexGuteniev requested a review from a team as a code owner June 27, 2025 18:48
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Jun 27, 2025
@AlexGuteniev AlexGuteniev force-pushed the wmemchr branch 2 times, most recently from dc28407 to c03a3ed Compare July 1, 2025 18:44
@StephanTLavavej
Copy link
Member

This is restoring it for sized calls only, which seems safe. The problem was with unsized.

@StephanTLavavej StephanTLavavej added performance Must go faster ranges C++20/23 ranges labels Jul 2, 2025
@StephanTLavavej StephanTLavavej self-assigned this Jul 2, 2025
@StephanTLavavej StephanTLavavej removed their assignment Jul 10, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Jul 10, 2025
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Jul 14, 2025
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit b7181cd into microsoft:main Jul 15, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Jul 15, 2025
@StephanTLavavej
Copy link
Member

Thanks for getting us to the right place here! 🎯 🚀 😸

@AlexGuteniev AlexGuteniev deleted the wmemchr branch July 15, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster ranges C++20/23 ranges
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants