Skip to content

Update Vectorized STL algorithm documentation to reflect the current state#5937

Merged
v-dirichards merged 1 commit into
MicrosoftDocs:mainfrom
AlexGuteniev:patch-1
Jun 9, 2026
Merged

Update Vectorized STL algorithm documentation to reflect the current state#5937
v-dirichards merged 1 commit into
MicrosoftDocs:mainfrom
AlexGuteniev:patch-1

Conversation

@AlexGuteniev

Copy link
Copy Markdown
Contributor

Since the last update:

  • ARM64 and ARM64EC vectorization was added. Mention of x64 and x86 is removed, as vectorization is now supported on any target, except deprecated /clr:pure and /clr:safe modes.
  • includes is now manually vectorized too
  • replace_copy is now manually vectorized too

Also moved find_end to search / search_n group, where it fits better.

…stae

Since the last update:
 * ARM64 and ARM64EC vectorization was added. Mention of x64 and x86 is removed, as vectorization is now supported on any target, except deprecated `/clr:pure` and `/clr:safe` modes.
 * `includes` is now manually vectorized too
 * `replace_copy` is now manually vectorized too

Also moved `find_end` to `search` / `search_n` group, where it fits better.
@prmerger-automator

Copy link
Copy Markdown
Contributor

@AlexGuteniev : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@v-regandowner

Copy link
Copy Markdown
Contributor

@TylerMSFT

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator Bot added the aq-pr-triaged Tracking label for the PR review team label Jun 9, 2026

@TylerMSFT TylerMSFT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for the updates!

@TylerMSFT

Copy link
Copy Markdown
Collaborator

#sign-off

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the MSVC STL vectorized-algorithms documentation to reflect which algorithms are manually vectorized and reorganizes part of the algorithm list to better match conceptual groupings.

Changes:

  • Updates the “Manual vectorization” description to be target-agnostic.
  • Re-groups find_end under the search / search_n set.
  • Expands the manually vectorized algorithm list to include includes and replace_copy.
Comments suppressed due to low confidence (1)

docs/standard-library/vectorized-stl-algorithms.md:31

  • This section still mentions x64/x86 defaults and doesn’t mention the /clr:pure and /clr:safe exception described in the PR metadata. That makes the updated platform-agnostic wording in this paragraph inconsistent with the rest of the topic and with the PR’s stated intent.
Certain algorithms include manual vectorization. This implementation is separately compiled and relies on runtime CPU dispatch, so it applies only to suitable CPUs.

Manually vectorized algorithms use template metaprogramming to detect if the element type is suitable for vectorization. As a result, they're only vectorized for simple types such as standard integer types.

Programs either benefit in performance from manual vectorization or remain unaffected by it. Disable manual vectorization by defining `_USE_STD_VECTOR_ALGORITHMS=0` in your project. Manually vectorized algorithms are enabled by default on x64 and x86 because `_USE_STD_VECTOR_ALGORITHMS` defaults to 1 on those platforms.

@v-dirichards v-dirichards merged commit f7f37ef into MicrosoftDocs:main Jun 9, 2026
1 check passed
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.

5 participants