Update Vectorized STL algorithm documentation to reflect the current state - #5937
Conversation
…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.
|
Alex Guteniev (@AlexGuteniev) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
Tyler Whitney (TylerMSFT)
left a comment
There was a problem hiding this comment.
Thank you for the updates!
|
#sign-off |
There was a problem hiding this comment.
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_endunder thesearch/search_nset. - Expands the manually vectorized algorithm list to include
includesandreplace_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:pureand/clr:safeexception 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.
f7f37ef
into
MicrosoftDocs:main
…//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>
…//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>
…//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>
…//github.com/MicrosoftDocs/cpp-docs (branch main) (#6788) * 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. * Add new ARM64 feature arguments to documentation (#5950) Add new extensions `cssc` and `faminmax` to the `/feature` flag arguments documentation * atexit: Clarify DLL behavior is the same as _onexit (#5952) * atexit: Clarify DLL behavior is the same as _onexit - Document that atexit called from within a DLL will register the routine to run when the DLL is unloaded. atexit is a wrapper around _onexit which already documents this behavior. Ref: curl/curl#22383 (comment) Reported-by: Michał Petryka Closes #xxxx * Revise atexit documentation for accuracy Update the date and clarify DLL behavior for atexit. --------- Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.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> Co-authored-by: Eric Brumer <ericbr@microsoft.com> Co-authored-by: Vít Knobloch <67308900+vitknobloch@users.noreply.github.com> Co-authored-by: Jay Satiro <raysatiro@yahoo.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com>
…//github.com/MicrosoftDocs/cpp-docs (branch main) (#6797) * 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. * Add new ARM64 feature arguments to documentation (#5950) Add new extensions `cssc` and `faminmax` to the `/feature` flag arguments documentation * atexit: Clarify DLL behavior is the same as _onexit (#5952) * atexit: Clarify DLL behavior is the same as _onexit - Document that atexit called from within a DLL will register the routine to run when the DLL is unloaded. atexit is a wrapper around _onexit which already documents this behavior. Ref: curl/curl#22383 (comment) Reported-by: Michał Petryka Closes #xxxx * Revise atexit documentation for accuracy Update the date and clarify DLL behavior for atexit. --------- Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> * Resolve syncing conflicts from FromPrivateLiveToMaster to main (#5953) --------- 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> Co-authored-by: Vít Knobloch <67308900+vitknobloch@users.noreply.github.com> Co-authored-by: Jay Satiro <raysatiro@yahoo.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: Hector <v-ndat@microsoft.com>
…//github.com/MicrosoftDocs/cpp-docs (branch main) (#6802) * 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. * Add new ARM64 feature arguments to documentation (#5950) Add new extensions `cssc` and `faminmax` to the `/feature` flag arguments documentation * atexit: Clarify DLL behavior is the same as _onexit (#5952) * atexit: Clarify DLL behavior is the same as _onexit - Document that atexit called from within a DLL will register the routine to run when the DLL is unloaded. atexit is a wrapper around _onexit which already documents this behavior. Ref: curl/curl#22383 (comment) Reported-by: Michał Petryka Closes #xxxx * Revise atexit documentation for accuracy Update the date and clarify DLL behavior for atexit. --------- Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> * Resolve syncing conflicts from FromPrivateLiveToMaster to main (#5953) * Clarify sentence about updating UI item states (#5955) Added a question mark to clarify the sentence about updating the state of user-interface items. * Update acquisition doc for vcpkg (#5957) * Update acquisition doc for vcpkg * remove en-us from URL * use relative link to vcpkg docs * Update docs/mfc/how-to-update-user-interface-objects.md Co-authored-by: learn-build-service-prod-08[bot] <274430765+learn-build-service-prod-08[bot]@users.noreply.github.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> Co-authored-by: Eric Brumer <ericbr@microsoft.com> Co-authored-by: Vít Knobloch <67308900+vitknobloch@users.noreply.github.com> Co-authored-by: Jay Satiro <raysatiro@yahoo.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: Daniel Nikolov <114946180+danikolovv@users.noreply.github.com> Co-authored-by: Hector <v-ndat@microsoft.com> Co-authored-by: learn-build-service-prod-08[bot] <274430765+learn-build-service-prod-08[bot]@users.noreply.github.com>
Since the last update:
/clr:pureand/clr:safemodes.includesis now manually vectorized tooreplace_copyis now manually vectorized tooAlso moved
find_endtosearch/search_ngroup, where it fits better.