`vector_algorithms.cpp`: remove incorrect `__assume` by AlexGuteniev · Pull Request #5761 · microsoft/STL · GitHub
Skip to content

vector_algorithms.cpp: remove incorrect __assume#5761

Merged
StephanTLavavej merged 1 commit into
microsoft:mainfrom
AlexGuteniev:assume-nothing
Oct 10, 2025
Merged

vector_algorithms.cpp: remove incorrect __assume#5761
StephanTLavavej merged 1 commit into
microsoft:mainfrom
AlexGuteniev:assume-nothing

Conversation

@AlexGuteniev

Copy link
Copy Markdown
Contributor

The idea behind that __assume was to tell the compiler that memcpy is small.

Unfortunately, the compilers are still only able to optimize memcpy only for exactly known size, not "small" size or other size characteristics.

The __assume was also incorrect. as the comparison was bits vs bytes.

@AlexGuteniev AlexGuteniev requested a review from a team as a code owner October 4, 2025 08:16
@github-project-automation github-project-automation Bot moved this to Initial Review in STL Code Reviews Oct 4, 2025
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Oct 4, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Oct 4, 2025
@StephanTLavavej

Copy link
Copy Markdown
Member

@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Oct 9, 2025
@StephanTLavavej StephanTLavavej merged commit 2251b37 into microsoft:main Oct 10, 2025
39 checks passed
@github-project-automation github-project-automation Bot moved this from Merging to Done in STL Code Reviews Oct 10, 2025
@StephanTLavavej

Copy link
Copy Markdown
Member

@AlexGuteniev AlexGuteniev deleted the assume-nothing branch October 10, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants