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
learn-build-service-prod Bot added a commit that referenced this pull request Jun 15, 2026
…//github.com/MicrosoftDocs/cpp-docs (branch main) (#6747)

* Update Vectorized STL algorithm documentation to reflect the current stae (#5937)

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.

* Update header-files-cpp.md (#5938)

Clarify intent of section

---------

Co-authored-by: learn-build-service-prod[bot] <113403604+learn-build-service-prod[bot]@users.noreply.github.com>
Co-authored-by: Learn Build Service GitHub App <Learn Build Service LearnBuild@microsoft.com>
Co-authored-by: Alex Guteniev <gutenev@gmail.com>
Co-authored-by: veganaiZe <7102064+veganaiZe@users.noreply.github.com>
learn-build-service-prod Bot added a commit that referenced this pull request Jul 8, 2026
…//github.com/MicrosoftDocs/cpp-docs (branch main) (#6756)

* Update Vectorized STL algorithm documentation to reflect the current stae (#5937)

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.

* Update header-files-cpp.md (#5938)

Clarify intent of section

* Update documentation on accessing System.String characters (#5940)

* Update documentation on accessing System.String characters

Added important note about treating interior pointers as const and linked to unsafe code best practices.

* Update docs/dotnet/how-to-access-characters-in-a-system-string.md

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Apply suggestions from code review

Co-authored-by: Aaron R Robinson <arobins@microsoft.com>

* Apply suggestions from code review

Co-authored-by: Aaron R Robinson <arobins@microsoft.com>

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

---------

Co-authored-by: learn-build-service-prod[bot] <113403604+learn-build-service-prod[bot]@users.noreply.github.com>
Co-authored-by: Learn Build Service GitHub App <Learn Build Service LearnBuild@microsoft.com>
Co-authored-by: Alex Guteniev <gutenev@gmail.com>
Co-authored-by: veganaiZe <7102064+veganaiZe@users.noreply.github.com>
Co-authored-by: Aaron R Robinson <arobins@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
learn-build-service-prod Bot added a commit that referenced this pull request Jul 28, 2026
…//github.com/MicrosoftDocs/cpp-docs (branch main) (#6778)

* Update Vectorized STL algorithm documentation to reflect the current stae (#5937)

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.

* Update header-files-cpp.md (#5938)

Clarify intent of section

* Update documentation on accessing System.String characters (#5940)

* Update documentation on accessing System.String characters

Added important note about treating interior pointers as const and linked to unsafe code best practices.

* Update docs/dotnet/how-to-access-characters-in-a-system-string.md

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Apply suggestions from code review

Co-authored-by: Aaron R Robinson <arobins@microsoft.com>

* Apply suggestions from code review

Co-authored-by: Aaron R Robinson <arobins@microsoft.com>

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Clarify version prefix for Visual Studio Command Prompt (#5946)

Updated instructions for starting Visual Studio Command Prompt to reflect changes in version specification.

---------

Co-authored-by: learn-build-service-prod[bot] <113403604+learn-build-service-prod[bot]@users.noreply.github.com>
Co-authored-by: Learn Build Service GitHub App <Learn Build Service LearnBuild@microsoft.com>
Co-authored-by: Alex Guteniev <gutenev@gmail.com>
Co-authored-by: veganaiZe <7102064+veganaiZe@users.noreply.github.com>
Co-authored-by: Aaron R Robinson <arobins@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Eric Brumer <ericbr@microsoft.com>
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