Skip to content

Conversation

AlexGuteniev
Copy link
Contributor

Fixes microsoft/STL#5556.

The intention is to make users aware of manual vectorization and _USE_STD_VECTOR_ALGORITHMS and _USE_STD_VECTOR_FLOATING_ALGORITHMS macros.

Copy link
Contributor

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

Copy link
Contributor

Learn Build status updates of commit 814cd8f:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
docs/standard-library/toc.yml ❌Error Details
docs/standard-library/vectorized-stl-algoritms.md 💡Suggestion Details

docs/standard-library/toc.yml

  • Line 1654, Column 11: [Error: yaml-syntax-error - See documentation] While scanning a plain scalar value, found invalid mapping.

docs/standard-library/vectorized-stl-algoritms.md

  • Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copy link
Contributor

Learn Build status updates of commit 4272d7e:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
docs/standard-library/toc.yml ❌Error Details

docs/standard-library/toc.yml

  • Line 1654, Column 12: [Error: yaml-syntax-error - See documentation] While scanning a plain scalar value, found invalid mapping.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copy link
Contributor

Learn Build status updates of commit cc385c5:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/standard-library/toc.yml ⚠️Warning Details
docs/standard-library/vectorized-stl-algoritms.md ✅Succeeded

docs/standard-library/toc.yml

  • Line 1654, Column 9: [Warning: file-not-found - See documentation] Invalid file link: 'vectorized-stl-algorithms.md'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copy link
Contributor

Learn Build status updates of commit 86a3e29:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/toc.yml ✅Succeeded
docs/standard-library/vectorized-stl-algorithms.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

Copy link
Contributor

@Alcaro Alcaro left a comment

Choose a reason for hiding this comment

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

why does github subscribe me to the issue when I start writing a review, not at the end when it's public?


Generally, programs either benefit in performance from this manual vectorization or are unaffected by it. In case of any problem, you can disable manual vectorization by defining `_USE_STD_VECTOR_ALGORITHMS` macro set to 0.

The following algorithms have manual vectorization controlled via `_USE_STD_VECTOR_ALGORITHMS` macro:
Copy link
Contributor

Choose a reason for hiding this comment

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

Having such a list kinda makes me nervous; if someone vectorizes a new function and forgets adding it here, we've got problems. This is very easy when it isn't even in the ms-stl repo.

Also what kind of sorting is that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know,
Plus it is accurate for like the latest Preview, not latest production.
But I still think providing an approximation here is useful and better than no list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Approximately standard order or cppreference.com order.

@AlexGuteniev AlexGuteniev requested a review from Alcaro September 19, 2025 17:53
Copy link
Contributor

Learn Build status updates of commit 53ae06f:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/toc.yml ✅Succeeded
docs/standard-library/vectorized-stl-algorithms.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

@Rageking8
Copy link
Contributor

AFAIK new topics can't be added via the public repo and needs to be ported manually. Could check with @TylerMSFT for further comments.

@Court72
Copy link
Contributor

Court72 commented Sep 19, 2025

@TylerMSFT

If you approve the new content in this PR, the commits must be moved to the private repository for automated checks and publishing. After you move the commits, close this PR (#please-close). If you need help moving the commits, contact the publicprs alias.

#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 Sep 19, 2025
@TylerMSFT
Copy link
Collaborator

Thank you for the content, @AlexGuteniev. Appreciate you taking the time to contribute to the docs.
It's true that we can't add content from the public repo. It's no problem because I'll port it and get it published after we do some review.
I have some things in my queue but will return to this.
Thanks again.

Copy link
Contributor

Learn Build status updates of commit 6c10dc3:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/toc.yml ✅Succeeded
docs/standard-library/vectorized-stl-algorithms.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

Copy link
Contributor

Learn Build status updates of commit b1600d8:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/toc.yml ✅Succeeded
docs/standard-library/vectorized-stl-algorithms.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

Co-authored-by: Rageking8 <[email protected]>
Copy link
Contributor

Learn Build status updates of commit becc300:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/toc.yml ✅Succeeded
docs/standard-library/vectorized-stl-algorithms.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

Copy link
Contributor

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this contribution!
I did a preliminary pass, focused primarily on the clarity of the text.
I'll defer to @StephanTLavavej for the technical details.

Copy link
Contributor

Learn Build status updates of commit 053dac2:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/toc.yml ✅Succeeded
docs/standard-library/vectorized-stl-algorithms.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

Co-authored-by: David Justo <[email protected]>
Copy link
Contributor

Learn Build status updates of commit 8f4b39f:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/toc.yml ✅Succeeded
docs/standard-library/vectorized-stl-algorithms.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

Co-authored-by: StephanTLavavej <[email protected]>
Copy link
Contributor

Learn Build status updates of commit 6d98a0e:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/toc.yml ✅Succeeded
docs/standard-library/vectorized-stl-algorithms.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

Copy link
Contributor

Learn Build status updates of commit 59f9977:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/toc.yml ✅Succeeded
docs/standard-library/vectorized-stl-algorithms.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.

Copy link
Contributor

Learn Build status updates of commit ce5dca4:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/toc.yml ✅Succeeded
docs/standard-library/vectorized-stl-algorithms.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.


Generally, programs either benefit in performance from this manual vectorization or are unaffected by it. In case of any problem, you can disable manual vectorization by defining the `_USE_STD_VECTOR_ALGORITHMS` macro set to 0. It defaults to 1 on x64 and x86, which means that manually vectorized algorithms are enabled by default.

When overriding `_USE_STD_VECTOR_ALGORITHMS` make sure to set the same value for all linked translation units that use algorithms. Reliable way to achieve that is using project properties rather than defining it in the source.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you provide the steps for how to set this in the project. Since that's the main direction we want them to go, we should show them how. It also helps reassure the reader that they are doing it right if they aren't totally clear on what it means to set project properties.

@TylerMSFT
Copy link
Collaborator

@AlexGuteniev , I very much appreciate you doing the work to write this new topic.

Please @mention me when you are ready for me to port this to the private repo so I can stage it and get it published.

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.

Document manually-vectorized algorithms
7 participants